@codingame/monaco-vscode-chat-service-override 23.0.2 → 23.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +43 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +106 -74
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingCodeEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookEditorIntegration.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/simpleBrowserEditorOverlay.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagement.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditor.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatManagementEditorInput.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatModelsWidget.js +28 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/chatManagement/chatUsageWidget.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/chatQuick.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatResponseAccessibleView.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/localChatSessionsProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/chatSessionsView.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsTreeRenderer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/view/sessionsViewPane.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions.contribution.js +33 -33
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +52 -52
- package/vscode/src/vs/workbench/contrib/chat/browser/chatStatus.js +65 -65
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatViewPane.js +6 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js +32 -32
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +57 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/chatModeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptCodingAgentActionOverlay.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptToolsCodeLensProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/promptUrlHandler.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/runPromptAction.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/promptSyntax/saveAsPromptFileActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatProgressTypes/chatToolInvocation.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatSessionStore.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/chatPromptFilesContribution.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptCodeActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHeaderAutocompletion.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptHovers.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/languageProviders/promptValidator.js +53 -53
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +27 -27
- package/vscode/src/vs/workbench/contrib/chat/common/voiceChatService.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChat.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +22 -23
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +8 -8
- package/vscode/src/vs/workbench/contrib/remoteCodingAgents/browser/remoteCodingAgents.contribution.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatAccessibilityHelp.js +16 -16
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.js +18 -18
- package/vscode/src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/runInTerminalHelpers.js +4 -4
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/terminal.chatAgentTools.contribution.js +5 -5
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineAutoApproveAnalyzer.js +10 -10
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/commandLineAnalyzer/commandLineFileWriteAnalyzer.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalLastCommandTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalOutputTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/getTerminalSelectionTool.js +3 -3
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.js +9 -9
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalConfirmationTool.js +2 -2
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.js +10 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/createAndRunTaskTool.js +15 -15
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/getTaskOutputTool.js +7 -7
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/runTaskTool.js +14 -14
- package/vscode/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/task/taskHelpers.js +1 -1
|
@@ -63,43 +63,43 @@ const gaugeForeground = registerColor('gauge.foreground', {
|
|
|
63
63
|
light: inputValidationInfoBorder,
|
|
64
64
|
hcDark: contrastBorder,
|
|
65
65
|
hcLight: contrastBorder
|
|
66
|
-
}, ( localize(
|
|
66
|
+
}, ( localize(5461, "Gauge foreground color.")));
|
|
67
67
|
registerColor('gauge.background', {
|
|
68
68
|
dark: ( transparent(gaugeForeground, 0.3)),
|
|
69
69
|
light: ( transparent(gaugeForeground, 0.3)),
|
|
70
70
|
hcDark: Color.white,
|
|
71
71
|
hcLight: Color.white
|
|
72
|
-
}, ( localize(
|
|
72
|
+
}, ( localize(5462, "Gauge background color.")));
|
|
73
73
|
registerColor('gauge.border', {
|
|
74
74
|
dark: null,
|
|
75
75
|
light: null,
|
|
76
76
|
hcDark: contrastBorder,
|
|
77
77
|
hcLight: contrastBorder
|
|
78
|
-
}, ( localize(
|
|
78
|
+
}, ( localize(5463, "Gauge border color.")));
|
|
79
79
|
const gaugeWarningForeground = registerColor('gauge.warningForeground', {
|
|
80
80
|
dark: inputValidationWarningBorder,
|
|
81
81
|
light: inputValidationWarningBorder,
|
|
82
82
|
hcDark: contrastBorder,
|
|
83
83
|
hcLight: contrastBorder
|
|
84
|
-
}, ( localize(
|
|
84
|
+
}, ( localize(5464, "Gauge warning foreground color.")));
|
|
85
85
|
registerColor('gauge.warningBackground', {
|
|
86
86
|
dark: ( transparent(gaugeWarningForeground, 0.3)),
|
|
87
87
|
light: ( transparent(gaugeWarningForeground, 0.3)),
|
|
88
88
|
hcDark: Color.white,
|
|
89
89
|
hcLight: Color.white
|
|
90
|
-
}, ( localize(
|
|
90
|
+
}, ( localize(5465, "Gauge warning background color.")));
|
|
91
91
|
const gaugeErrorForeground = registerColor('gauge.errorForeground', {
|
|
92
92
|
dark: inputValidationErrorBorder,
|
|
93
93
|
light: inputValidationErrorBorder,
|
|
94
94
|
hcDark: contrastBorder,
|
|
95
95
|
hcLight: contrastBorder
|
|
96
|
-
}, ( localize(
|
|
96
|
+
}, ( localize(5466, "Gauge error foreground color.")));
|
|
97
97
|
registerColor('gauge.errorBackground', {
|
|
98
98
|
dark: ( transparent(gaugeErrorForeground, 0.3)),
|
|
99
99
|
light: ( transparent(gaugeErrorForeground, 0.3)),
|
|
100
100
|
hcDark: Color.white,
|
|
101
101
|
hcLight: Color.white
|
|
102
|
-
}, ( localize(
|
|
102
|
+
}, ( localize(5467, "Gauge error background color.")));
|
|
103
103
|
const defaultChat = {
|
|
104
104
|
completionsEnablementSetting: product.defaultChatAgent?.completionsEnablementSetting ?? '',
|
|
105
105
|
nextEditSuggestionsSetting: product.defaultChatAgent?.nextEditSuggestionsSetting ?? '',
|
|
@@ -167,7 +167,7 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
|
|
|
167
167
|
}
|
|
168
168
|
getEntryProps() {
|
|
169
169
|
let text = '$(copilot)';
|
|
170
|
-
let ariaLabel = ( localize(
|
|
170
|
+
let ariaLabel = ( localize(5468, "Copilot status"));
|
|
171
171
|
let kind;
|
|
172
172
|
if (isNewUser(this.chatEntitlementService)) {
|
|
173
173
|
const entitlement = this.chatEntitlementService.entitlement;
|
|
@@ -176,7 +176,7 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
|
|
|
176
176
|
isProUser(entitlement) ||
|
|
177
177
|
entitlement === ChatEntitlement.Free
|
|
178
178
|
) {
|
|
179
|
-
const finishSetup = ( localize(
|
|
179
|
+
const finishSetup = ( localize(5469, "Finish Setup"));
|
|
180
180
|
text = `$(copilot) ${finishSetup}`;
|
|
181
181
|
ariaLabel = finishSetup;
|
|
182
182
|
kind = 'prominent';
|
|
@@ -188,19 +188,19 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
|
|
|
188
188
|
const chatSessionsInProgressCount = this.chatSessionsService.getInProgress().reduce((total, item) => total + item.count, 0);
|
|
189
189
|
if (this.chatEntitlementService.sentiment.disabled || this.chatEntitlementService.sentiment.untrusted) {
|
|
190
190
|
text = '$(copilot-unavailable)';
|
|
191
|
-
ariaLabel = ( localize(
|
|
191
|
+
ariaLabel = ( localize(5470, "Copilot disabled"));
|
|
192
192
|
}
|
|
193
193
|
else if (chatSessionsInProgressCount > 0) {
|
|
194
194
|
text = '$(copilot-in-progress)';
|
|
195
195
|
if (chatSessionsInProgressCount > 1) {
|
|
196
|
-
ariaLabel = ( localize(
|
|
196
|
+
ariaLabel = ( localize(5471, "{0} agent sessions in progress", chatSessionsInProgressCount));
|
|
197
197
|
}
|
|
198
198
|
else {
|
|
199
|
-
ariaLabel = ( localize(
|
|
199
|
+
ariaLabel = ( localize(5472, "1 agent session in progress"));
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
else if (this.chatEntitlementService.entitlement === ChatEntitlement.Unknown) {
|
|
203
|
-
const signedOutWarning = ( localize(
|
|
203
|
+
const signedOutWarning = ( localize(5473, "Signed out"));
|
|
204
204
|
text = `${this.chatEntitlementService.anonymous ? '$(copilot)' : '$(copilot-not-connected)'} ${signedOutWarning}`;
|
|
205
205
|
ariaLabel = signedOutWarning;
|
|
206
206
|
kind = 'prominent';
|
|
@@ -208,13 +208,13 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
|
|
|
208
208
|
else if (this.chatEntitlementService.entitlement === ChatEntitlement.Free && (chatQuotaExceeded || completionsQuotaExceeded)) {
|
|
209
209
|
let quotaWarning;
|
|
210
210
|
if (chatQuotaExceeded && !completionsQuotaExceeded) {
|
|
211
|
-
quotaWarning = ( localize(
|
|
211
|
+
quotaWarning = ( localize(5474, "Chat quota reached"));
|
|
212
212
|
}
|
|
213
213
|
else if (completionsQuotaExceeded && !chatQuotaExceeded) {
|
|
214
|
-
quotaWarning = ( localize(
|
|
214
|
+
quotaWarning = ( localize(5475, "Inline suggestions quota reached"));
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
217
|
-
quotaWarning = ( localize(
|
|
217
|
+
quotaWarning = ( localize(5476, "Quota reached"));
|
|
218
218
|
}
|
|
219
219
|
text = `$(copilot-warning) ${quotaWarning}`;
|
|
220
220
|
ariaLabel = quotaWarning;
|
|
@@ -222,15 +222,15 @@ let ChatStatusBarEntry = class ChatStatusBarEntry extends Disposable {
|
|
|
222
222
|
}
|
|
223
223
|
else if (this.editorService.activeTextEditorLanguageId && !isCompletionsEnabled(this.configurationService, this.editorService.activeTextEditorLanguageId)) {
|
|
224
224
|
text = '$(copilot-unavailable)';
|
|
225
|
-
ariaLabel = ( localize(
|
|
225
|
+
ariaLabel = ( localize(5477, "Inline suggestions disabled"));
|
|
226
226
|
}
|
|
227
227
|
else if (this.completionsService.isSnoozing()) {
|
|
228
228
|
text = '$(copilot-snooze)';
|
|
229
|
-
ariaLabel = ( localize(
|
|
229
|
+
ariaLabel = ( localize(5478, "Inline suggestions snoozed"));
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
const baseResult = {
|
|
233
|
-
name: ( localize(
|
|
233
|
+
name: ( localize(5479, "Copilot Status")),
|
|
234
234
|
text,
|
|
235
235
|
ariaLabel,
|
|
236
236
|
command: ShowTooltipCommand,
|
|
@@ -320,19 +320,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
320
320
|
};
|
|
321
321
|
const { chat: chatQuota, completions: completionsQuota, premiumChat: premiumChatQuota, resetDate, resetDateHasTime } = this.chatEntitlementService.quotas;
|
|
322
322
|
if (chatQuota || completionsQuota || premiumChatQuota) {
|
|
323
|
-
addSeparator(( localize(
|
|
323
|
+
addSeparator(( localize(5480, "Copilot Usage")), toAction({
|
|
324
324
|
id: 'workbench.action.manageCopilot',
|
|
325
|
-
label: ( localize(
|
|
326
|
-
tooltip: ( localize(
|
|
325
|
+
label: ( localize(5481, "Manage Chat")),
|
|
326
|
+
tooltip: ( localize(5482, "Manage Chat")),
|
|
327
327
|
class: ThemeIcon.asClassName(Codicon.settings),
|
|
328
328
|
run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(defaultChat.manageSettingsUrl)))),
|
|
329
329
|
}));
|
|
330
|
-
const completionsQuotaIndicator = completionsQuota && (completionsQuota.total > 0 || completionsQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, completionsQuota, ( localize(
|
|
331
|
-
const chatQuotaIndicator = chatQuota && (chatQuota.total > 0 || chatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, chatQuota, ( localize(
|
|
332
|
-
const premiumChatQuotaIndicator = premiumChatQuota && (premiumChatQuota.total > 0 || premiumChatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, premiumChatQuota, ( localize(
|
|
330
|
+
const completionsQuotaIndicator = completionsQuota && (completionsQuota.total > 0 || completionsQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, completionsQuota, ( localize(5483, "Inline Suggestions")), false) : undefined;
|
|
331
|
+
const chatQuotaIndicator = chatQuota && (chatQuota.total > 0 || chatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, chatQuota, ( localize(5484, "Chat messages")), false) : undefined;
|
|
332
|
+
const premiumChatQuotaIndicator = premiumChatQuota && (premiumChatQuota.total > 0 || premiumChatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, premiumChatQuota, ( localize(5485, "Premium requests")), true) : undefined;
|
|
333
333
|
if (resetDate) {
|
|
334
334
|
this.element.appendChild($('div.description', undefined, ( localize(
|
|
335
|
-
|
|
335
|
+
5486,
|
|
336
336
|
"Allowance resets {0}.",
|
|
337
337
|
resetDateHasTime ? this.dateTimeFormatter.value.format(( new Date(resetDate))) : this.dateFormatter.value.format(( new Date(resetDate)))
|
|
338
338
|
))));
|
|
@@ -342,7 +342,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
342
342
|
this.element,
|
|
343
343
|
{ ...defaultButtonStyles, hoverDelegate: nativeHoverDelegate, secondary: canUseChat(this.chatEntitlementService) }
|
|
344
344
|
)));
|
|
345
|
-
upgradeProButton.label = ( localize(
|
|
345
|
+
upgradeProButton.label = ( localize(5487, "Upgrade to GitHub Copilot Pro"));
|
|
346
346
|
disposables.add(upgradeProButton.onDidClick(() => this.runCommandAndClose('workbench.action.chat.upgradePlan')));
|
|
347
347
|
}
|
|
348
348
|
(async () => {
|
|
@@ -363,19 +363,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
363
363
|
})();
|
|
364
364
|
}
|
|
365
365
|
else if (this.chatEntitlementService.anonymous && this.chatEntitlementService.sentiment.installed) {
|
|
366
|
-
addSeparator(( localize(
|
|
367
|
-
this.createQuotaIndicator(this.element, disposables, ( localize(
|
|
368
|
-
this.createQuotaIndicator(this.element, disposables, ( localize(
|
|
366
|
+
addSeparator(( localize(5488, "Copilot Usage")));
|
|
367
|
+
this.createQuotaIndicator(this.element, disposables, ( localize(5489, "Limited")), ( localize(5483, "Inline Suggestions")), false);
|
|
368
|
+
this.createQuotaIndicator(this.element, disposables, ( localize(5489, "Limited")), ( localize(5484, "Chat messages")), false);
|
|
369
369
|
}
|
|
370
370
|
{
|
|
371
371
|
let chatSessionsElement;
|
|
372
372
|
const updateStatus = () => {
|
|
373
373
|
const inProgress = this.chatSessionsService.getInProgress();
|
|
374
374
|
if (( inProgress.some(item => item.count > 0))) {
|
|
375
|
-
addSeparator(( localize(
|
|
375
|
+
addSeparator(( localize(5490, "Agent Sessions")), toAction({
|
|
376
376
|
id: 'workbench.view.chat.status.sessions',
|
|
377
|
-
label: ( localize(
|
|
378
|
-
tooltip: ( localize(
|
|
377
|
+
label: ( localize(5491, "View Agent Sessions")),
|
|
378
|
+
tooltip: ( localize(5492, "View Agent Sessions")),
|
|
379
379
|
class: ThemeIcon.asClassName(Codicon.eye),
|
|
380
380
|
run: () => {
|
|
381
381
|
if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') {
|
|
@@ -388,7 +388,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
388
388
|
}));
|
|
389
389
|
for (const { displayName, count } of inProgress) {
|
|
390
390
|
if (count > 0) {
|
|
391
|
-
const text = ( localize(
|
|
391
|
+
const text = ( localize(5493, "$(loading~spin) {0} in progress", displayName));
|
|
392
392
|
chatSessionsElement = this.element.appendChild($('div.description'));
|
|
393
393
|
const parts = renderLabelWithIcons(text);
|
|
394
394
|
chatSessionsElement.append(...parts);
|
|
@@ -421,10 +421,10 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
421
421
|
}
|
|
422
422
|
{
|
|
423
423
|
const chatSentiment = this.chatEntitlementService.sentiment;
|
|
424
|
-
addSeparator(( localize(
|
|
424
|
+
addSeparator(( localize(5494, "Inline Suggestions")), chatSentiment.installed && !chatSentiment.disabled && !chatSentiment.untrusted ? toAction({
|
|
425
425
|
id: 'workbench.action.openChatSettings',
|
|
426
|
-
label: ( localize(
|
|
427
|
-
tooltip: ( localize(
|
|
426
|
+
label: ( localize(5495, "Settings")),
|
|
427
|
+
tooltip: ( localize(5496, "Open Settings")),
|
|
428
428
|
class: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
429
429
|
run: () => this.runCommandAndClose(() => this.commandService.executeCommand('workbench.action.openSettings', { query: `@id:${defaultChat.completionsEnablementSetting} @id:${defaultChat.nextEditSuggestionsSetting}` })),
|
|
430
430
|
}) : undefined);
|
|
@@ -432,7 +432,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
432
432
|
}
|
|
433
433
|
if (canUseChat(this.chatEntitlementService)) {
|
|
434
434
|
const snooze = append(this.element, $('div.snooze-completions'));
|
|
435
|
-
this.createCompletionsSnooze(snooze, ( localize(
|
|
435
|
+
this.createCompletionsSnooze(snooze, ( localize(5497, "Snooze")), disposables);
|
|
436
436
|
}
|
|
437
437
|
{
|
|
438
438
|
const newUser = isNewUser(this.chatEntitlementService);
|
|
@@ -445,7 +445,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
445
445
|
let descriptionClass = '.description';
|
|
446
446
|
if (newUser && anonymousUser) {
|
|
447
447
|
descriptionText = ( new MarkdownString(( localize(
|
|
448
|
-
|
|
448
|
+
5498,
|
|
449
449
|
"By continuing with {0} Copilot, you agree to {1}'s [Terms]({2}) and [Privacy Statement]({3})",
|
|
450
450
|
defaultChat.provider.default.name,
|
|
451
451
|
defaultChat.provider.default.name,
|
|
@@ -455,29 +455,29 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
455
455
|
descriptionClass = `${descriptionClass}.terms`;
|
|
456
456
|
}
|
|
457
457
|
else if (newUser) {
|
|
458
|
-
descriptionText = ( localize(
|
|
458
|
+
descriptionText = ( localize(5499, "Set up Copilot to use AI features."));
|
|
459
459
|
}
|
|
460
460
|
else if (anonymousUser) {
|
|
461
|
-
descriptionText = ( localize(
|
|
461
|
+
descriptionText = ( localize(5500, "Sign in to enable more Copilot AI features."));
|
|
462
462
|
}
|
|
463
463
|
else if (disabled) {
|
|
464
|
-
descriptionText = ( localize(
|
|
464
|
+
descriptionText = ( localize(5501, "Enable Copilot to use AI features."));
|
|
465
465
|
}
|
|
466
466
|
else {
|
|
467
|
-
descriptionText = ( localize(
|
|
467
|
+
descriptionText = ( localize(5502, "Sign in to use Copilot AI features."));
|
|
468
468
|
}
|
|
469
469
|
let buttonLabel;
|
|
470
470
|
if (newUser) {
|
|
471
|
-
buttonLabel = ( localize(
|
|
471
|
+
buttonLabel = ( localize(5503, "Use AI Features"));
|
|
472
472
|
}
|
|
473
473
|
else if (anonymousUser) {
|
|
474
|
-
buttonLabel = ( localize(
|
|
474
|
+
buttonLabel = ( localize(5504, "Enable more AI Features"));
|
|
475
475
|
}
|
|
476
476
|
else if (disabled) {
|
|
477
|
-
buttonLabel = ( localize(
|
|
477
|
+
buttonLabel = ( localize(5505, "Enable AI Features"));
|
|
478
478
|
}
|
|
479
479
|
else {
|
|
480
|
-
buttonLabel = ( localize(
|
|
480
|
+
buttonLabel = ( localize(5506, "Sign in to use AI Features"));
|
|
481
481
|
}
|
|
482
482
|
let commandId;
|
|
483
483
|
if (newUser && anonymousUser) {
|
|
@@ -516,8 +516,8 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
516
516
|
const headerLink = typeof item.label === 'string' ? undefined : item.label.link;
|
|
517
517
|
this.renderHeader(itemElement, disposables, headerLabel, headerLink ? toAction({
|
|
518
518
|
id: 'workbench.action.openChatStatusItemLink',
|
|
519
|
-
label: ( localize(
|
|
520
|
-
tooltip: ( localize(
|
|
519
|
+
label: ( localize(5507, "Learn More")),
|
|
520
|
+
tooltip: ( localize(5507, "Learn More")),
|
|
521
521
|
class: ThemeIcon.asClassName(Codicon.linkExternal),
|
|
522
522
|
run: () => this.runCommandAndClose(() => this.openerService.open(( URI.parse(headerLink)))),
|
|
523
523
|
}) : undefined);
|
|
@@ -561,7 +561,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
561
561
|
quotaIndicator,
|
|
562
562
|
{ ...defaultButtonStyles, secondary: true, hoverDelegate: nativeHoverDelegate }
|
|
563
563
|
)));
|
|
564
|
-
manageOverageButton.label = ( localize(
|
|
564
|
+
manageOverageButton.label = ( localize(5508, "Manage paid premium requests"));
|
|
565
565
|
disposables.add(manageOverageButton.onDidClick(() => this.runCommandAndClose(() => this.openerService.open(( URI.parse(defaultChat.manageOverageUrl))))));
|
|
566
566
|
}
|
|
567
567
|
const update = (quota) => {
|
|
@@ -578,17 +578,17 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
578
578
|
quotaValue.textContent = quota;
|
|
579
579
|
}
|
|
580
580
|
else if (quota.unlimited) {
|
|
581
|
-
quotaValue.textContent = ( localize(
|
|
581
|
+
quotaValue.textContent = ( localize(5509, "Included"));
|
|
582
582
|
}
|
|
583
583
|
else if (quota.overageCount) {
|
|
584
584
|
quotaValue.textContent = ( localize(
|
|
585
|
-
|
|
585
|
+
5510,
|
|
586
586
|
"+{0} requests",
|
|
587
587
|
this.quotaOverageFormatter.value.format(quota.overageCount)
|
|
588
588
|
));
|
|
589
589
|
}
|
|
590
590
|
else {
|
|
591
|
-
quotaValue.textContent = ( localize(
|
|
591
|
+
quotaValue.textContent = ( localize(5511, "{0}%", this.quotaPercentageFormatter.value.format(usedPercentage)));
|
|
592
592
|
}
|
|
593
593
|
quotaBit.style.width = `${usedPercentage}%`;
|
|
594
594
|
if (usedPercentage >= 90) {
|
|
@@ -599,10 +599,10 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
599
599
|
}
|
|
600
600
|
if (supportsOverage) {
|
|
601
601
|
if (typeof quota !== 'string' && quota?.overageEnabled) {
|
|
602
|
-
overageLabel.textContent = ( localize(
|
|
602
|
+
overageLabel.textContent = ( localize(5512, "Additional paid premium requests enabled."));
|
|
603
603
|
}
|
|
604
604
|
else {
|
|
605
|
-
overageLabel.textContent = ( localize(
|
|
605
|
+
overageLabel.textContent = ( localize(5513, "Additional paid premium requests disabled."));
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
else {
|
|
@@ -617,15 +617,15 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
617
617
|
const settings = container.appendChild($('div.settings'));
|
|
618
618
|
{
|
|
619
619
|
const globalSetting = append(settings, $('div.setting'));
|
|
620
|
-
this.createInlineSuggestionsSetting(globalSetting, ( localize(
|
|
620
|
+
this.createInlineSuggestionsSetting(globalSetting, ( localize(5514, "All files")), '*', disposables);
|
|
621
621
|
if (modeId) {
|
|
622
622
|
const languageSetting = append(settings, $('div.setting'));
|
|
623
|
-
this.createInlineSuggestionsSetting(languageSetting, ( localize(
|
|
623
|
+
this.createInlineSuggestionsSetting(languageSetting, ( localize(5515, "{0}", this.languageService.getLanguageName(modeId) ?? modeId)), modeId, disposables);
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
{
|
|
627
627
|
const setting = append(settings, $('div.setting'));
|
|
628
|
-
this.createNextEditSuggestionsSetting(setting, ( localize(
|
|
628
|
+
this.createNextEditSuggestionsSetting(setting, ( localize(5516, "Next edit suggestions")), this.getCompletionsSettingAccessor(modeId), disposables);
|
|
629
629
|
}
|
|
630
630
|
return settings;
|
|
631
631
|
}
|
|
@@ -726,7 +726,7 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
726
726
|
const toolbar = disposables.add(( new ActionBar(actionBar, { hoverDelegate: nativeHoverDelegate })));
|
|
727
727
|
const cancelAction = toAction({
|
|
728
728
|
id: 'workbench.action.cancelSnoozeStatusBarLink',
|
|
729
|
-
label: ( localize(
|
|
729
|
+
label: ( localize(5517, "Cancel Snooze")),
|
|
730
730
|
run: () => this.inlineCompletionsService.cancelSnooze(),
|
|
731
731
|
class: ThemeIcon.asClassName(Codicon.stopCircle)
|
|
732
732
|
});
|
|
@@ -735,19 +735,19 @@ let ChatStatusDashboard = class ChatStatusDashboard extends Disposable {
|
|
|
735
735
|
toolbar.clear();
|
|
736
736
|
const timeLeftMs = this.inlineCompletionsService.snoozeTimeLeft;
|
|
737
737
|
if (!isEnabled || timeLeftMs <= 0) {
|
|
738
|
-
timerDisplay.textContent = ( localize(
|
|
738
|
+
timerDisplay.textContent = ( localize(5518, "Hide suggestions for 5 min"));
|
|
739
739
|
timerDisplay.title = '';
|
|
740
740
|
button.label = label;
|
|
741
|
-
button.setTitle(( localize(
|
|
741
|
+
button.setTitle(( localize(5519, "Hide inline suggestions for 5 min")));
|
|
742
742
|
return true;
|
|
743
743
|
}
|
|
744
744
|
const timeLeftSeconds = Math.ceil(timeLeftMs / 1000);
|
|
745
745
|
const minutes = Math.floor(timeLeftSeconds / 60);
|
|
746
746
|
const seconds = timeLeftSeconds % 60;
|
|
747
|
-
timerDisplay.textContent = `${minutes}:${seconds < 10 ? '0' : ''}${seconds} ${( localize(
|
|
748
|
-
timerDisplay.title = ( localize(
|
|
749
|
-
button.label = ( localize(
|
|
750
|
-
button.setTitle(( localize(
|
|
747
|
+
timerDisplay.textContent = `${minutes}:${seconds < 10 ? '0' : ''}${seconds} ${( localize(5520, "remaining"))}`;
|
|
748
|
+
timerDisplay.title = ( localize(5521, "Inline suggestions are hidden for the remaining duration"));
|
|
749
|
+
button.label = ( localize(5522, "+5 min"));
|
|
750
|
+
button.setTitle(( localize(5523, "Snooze additional 5 min")));
|
|
751
751
|
toolbar.push([cancelAction], { icon: true, label: false });
|
|
752
752
|
return false;
|
|
753
753
|
};
|
|
@@ -9,6 +9,7 @@ import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
9
9
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
10
10
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
11
11
|
import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
|
|
12
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
12
13
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
13
14
|
import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
14
15
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
@@ -28,6 +29,7 @@ export declare class ChatViewPane extends ViewPane implements IViewWelcomeDelega
|
|
|
28
29
|
private readonly logService;
|
|
29
30
|
private readonly layoutService;
|
|
30
31
|
private readonly chatSessionsService;
|
|
32
|
+
private readonly telemetryService;
|
|
31
33
|
private _widget;
|
|
32
34
|
get widget(): ChatWidget;
|
|
33
35
|
private readonly modelDisposables;
|
|
@@ -36,7 +38,7 @@ export declare class ChatViewPane extends ViewPane implements IViewWelcomeDelega
|
|
|
36
38
|
private _restoringSession;
|
|
37
39
|
constructor(chatOptions: {
|
|
38
40
|
location: ChatAgentLocation.Chat;
|
|
39
|
-
}, options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, hoverService: IHoverService, storageService: IStorageService, chatService: IChatService, chatAgentService: IChatAgentService, logService: ILogService, layoutService: ILayoutService, chatSessionsService: IChatSessionsService);
|
|
41
|
+
}, options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, hoverService: IHoverService, storageService: IStorageService, chatService: IChatService, chatAgentService: IChatAgentService, logService: ILogService, layoutService: ILayoutService, chatSessionsService: IChatSessionsService, telemetryService: ITelemetryService);
|
|
40
42
|
getActionsContext(): IChatViewTitleActionContext | undefined;
|
|
41
43
|
private updateModel;
|
|
42
44
|
shouldShowWelcome(): boolean;
|
|
@@ -17,6 +17,7 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
17
17
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
18
18
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
19
19
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
20
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
20
21
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
|
|
21
22
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
|
|
22
23
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
|
|
@@ -47,7 +48,7 @@ import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
47
48
|
const CHAT_SIDEBAR_PANEL_ID = 'workbench.panel.chat';
|
|
48
49
|
let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
49
50
|
get widget() { return this._widget; }
|
|
50
|
-
constructor(chatOptions, options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, storageService, chatService, chatAgentService, logService, layoutService, chatSessionsService) {
|
|
51
|
+
constructor(chatOptions, options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService, storageService, chatService, chatAgentService, logService, layoutService, chatSessionsService, telemetryService) {
|
|
51
52
|
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
|
|
52
53
|
this.chatOptions = chatOptions;
|
|
53
54
|
this.storageService = storageService;
|
|
@@ -56,6 +57,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
56
57
|
this.logService = logService;
|
|
57
58
|
this.layoutService = layoutService;
|
|
58
59
|
this.chatSessionsService = chatSessionsService;
|
|
60
|
+
this.telemetryService = telemetryService;
|
|
59
61
|
this.modelDisposables = this._register(( new DisposableStore()));
|
|
60
62
|
this.memento = ( new Memento('interactive-session-view-' + CHAT_PROVIDER_ID, this.storageService));
|
|
61
63
|
this.viewState = this.memento.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
@@ -151,6 +153,7 @@ let ChatViewPane = class ChatViewPane extends ViewPane {
|
|
|
151
153
|
async renderBody(parent) {
|
|
152
154
|
super.renderBody(parent);
|
|
153
155
|
this._register(this.instantiationService.createInstance(ChatViewWelcomeController, parent, this, this.chatOptions.location));
|
|
156
|
+
this.telemetryService.publicLog2('chatViewPaneOpened');
|
|
154
157
|
const scopedInstantiationService = this._register(this.instantiationService.createChild(( new ServiceCollection([IContextKeyService, this.scopedContextKeyService]))));
|
|
155
158
|
const locationBasedColors = this.getLocationBasedColors();
|
|
156
159
|
const editorOverflowNode = this.layoutService.getContainer(getWindow(parent)).appendChild($('.chat-editor-overflow.monaco-editor'));
|
|
@@ -256,7 +259,8 @@ ChatViewPane = ( __decorate([
|
|
|
256
259
|
( __param(13, IChatAgentService)),
|
|
257
260
|
( __param(14, ILogService)),
|
|
258
261
|
( __param(15, ILayoutService)),
|
|
259
|
-
( __param(16, IChatSessionsService))
|
|
262
|
+
( __param(16, IChatSessionsService)),
|
|
263
|
+
( __param(17, ITelemetryService))
|
|
260
264
|
], ChatViewPane));
|
|
261
265
|
|
|
262
266
|
export { CHAT_SIDEBAR_PANEL_ID, ChatViewPane };
|
|
@@ -58,7 +58,7 @@ let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
|
58
58
|
return ( new RenderedHoverParts([renderedHoverPart]));
|
|
59
59
|
}
|
|
60
60
|
getAccessibleContent(hoverPart) {
|
|
61
|
-
return localize(
|
|
61
|
+
return localize(5569, 'There is a chat agent hover part here.');
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
ChatAgentHoverParticipant = ( __decorate([
|