@codingame/monaco-vscode-chat-service-override 23.1.0 → 23.2.0
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/index.js +1 -1
- package/package.json +41 -43
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityActions.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +48 -48
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatFileTreeActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatImportExport.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatMoveActions.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatNewActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatPromptNavigationActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatSessionActions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionViewModel.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsView.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +101 -101
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAccessibilityService.js +3 -3
- 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 +18 -18
- 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.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOutputItemRenderer.js +4 -4
- 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 +8 -8
- 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/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.js +8 -8
- 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 +21 -21
- 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 +4 -4
- 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(5480, "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(5481, "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(5482, "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(5483, "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(5484, "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(5485, "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(5486, "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(5487, "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(5488, "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(5489, "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(5490, "{0} agent sessions in progress", chatSessionsInProgressCount));
|
|
197
197
|
}
|
|
198
198
|
else {
|
|
199
|
-
ariaLabel = ( localize(
|
|
199
|
+
ariaLabel = ( localize(5491, "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(5492, "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(5493, "Chat quota reached"));
|
|
212
212
|
}
|
|
213
213
|
else if (completionsQuotaExceeded && !chatQuotaExceeded) {
|
|
214
|
-
quotaWarning = ( localize(
|
|
214
|
+
quotaWarning = ( localize(5494, "Inline suggestions quota reached"));
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
217
|
-
quotaWarning = ( localize(
|
|
217
|
+
quotaWarning = ( localize(5495, "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(5496, "Inline suggestions disabled"));
|
|
226
226
|
}
|
|
227
227
|
else if (this.completionsService.isSnoozing()) {
|
|
228
228
|
text = '$(copilot-snooze)';
|
|
229
|
-
ariaLabel = ( localize(
|
|
229
|
+
ariaLabel = ( localize(5497, "Inline suggestions snoozed"));
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
const baseResult = {
|
|
233
|
-
name: ( localize(
|
|
233
|
+
name: ( localize(5498, "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(5499, "Copilot Usage")), toAction({
|
|
324
324
|
id: 'workbench.action.manageCopilot',
|
|
325
|
-
label: ( localize(
|
|
326
|
-
tooltip: ( localize(
|
|
325
|
+
label: ( localize(5500, "Manage Chat")),
|
|
326
|
+
tooltip: ( localize(5501, "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(5502, "Inline Suggestions")), false) : undefined;
|
|
331
|
+
const chatQuotaIndicator = chatQuota && (chatQuota.total > 0 || chatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, chatQuota, ( localize(5503, "Chat messages")), false) : undefined;
|
|
332
|
+
const premiumChatQuotaIndicator = premiumChatQuota && (premiumChatQuota.total > 0 || premiumChatQuota.unlimited) ? this.createQuotaIndicator(this.element, disposables, premiumChatQuota, ( localize(5504, "Premium requests")), true) : undefined;
|
|
333
333
|
if (resetDate) {
|
|
334
334
|
this.element.appendChild($('div.description', undefined, ( localize(
|
|
335
|
-
|
|
335
|
+
5505,
|
|
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(5506, "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(5507, "Copilot Usage")));
|
|
367
|
+
this.createQuotaIndicator(this.element, disposables, ( localize(5508, "Limited")), ( localize(5502, "Inline Suggestions")), false);
|
|
368
|
+
this.createQuotaIndicator(this.element, disposables, ( localize(5508, "Limited")), ( localize(5503, "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(5509, "Agent Sessions")), toAction({
|
|
376
376
|
id: 'workbench.view.chat.status.sessions',
|
|
377
|
-
label: ( localize(
|
|
378
|
-
tooltip: ( localize(
|
|
377
|
+
label: ( localize(5510, "View Agent Sessions")),
|
|
378
|
+
tooltip: ( localize(5511, "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(5512, "$(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(5513, "Inline Suggestions")), chatSentiment.installed && !chatSentiment.disabled && !chatSentiment.untrusted ? toAction({
|
|
425
425
|
id: 'workbench.action.openChatSettings',
|
|
426
|
-
label: ( localize(
|
|
427
|
-
tooltip: ( localize(
|
|
426
|
+
label: ( localize(5514, "Settings")),
|
|
427
|
+
tooltip: ( localize(5515, "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(5516, "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
|
+
5517,
|
|
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(5518, "Set up Copilot to use AI features."));
|
|
459
459
|
}
|
|
460
460
|
else if (anonymousUser) {
|
|
461
|
-
descriptionText = ( localize(
|
|
461
|
+
descriptionText = ( localize(5519, "Sign in to enable more Copilot AI features."));
|
|
462
462
|
}
|
|
463
463
|
else if (disabled) {
|
|
464
|
-
descriptionText = ( localize(
|
|
464
|
+
descriptionText = ( localize(5520, "Enable Copilot to use AI features."));
|
|
465
465
|
}
|
|
466
466
|
else {
|
|
467
|
-
descriptionText = ( localize(
|
|
467
|
+
descriptionText = ( localize(5521, "Sign in to use Copilot AI features."));
|
|
468
468
|
}
|
|
469
469
|
let buttonLabel;
|
|
470
470
|
if (newUser) {
|
|
471
|
-
buttonLabel = ( localize(
|
|
471
|
+
buttonLabel = ( localize(5522, "Use AI Features"));
|
|
472
472
|
}
|
|
473
473
|
else if (anonymousUser) {
|
|
474
|
-
buttonLabel = ( localize(
|
|
474
|
+
buttonLabel = ( localize(5523, "Enable more AI Features"));
|
|
475
475
|
}
|
|
476
476
|
else if (disabled) {
|
|
477
|
-
buttonLabel = ( localize(
|
|
477
|
+
buttonLabel = ( localize(5524, "Enable AI Features"));
|
|
478
478
|
}
|
|
479
479
|
else {
|
|
480
|
-
buttonLabel = ( localize(
|
|
480
|
+
buttonLabel = ( localize(5525, "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(5526, "Learn More")),
|
|
520
|
+
tooltip: ( localize(5526, "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(5527, "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(5528, "Included"));
|
|
582
582
|
}
|
|
583
583
|
else if (quota.overageCount) {
|
|
584
584
|
quotaValue.textContent = ( localize(
|
|
585
|
-
|
|
585
|
+
5529,
|
|
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(5530, "{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(5531, "Additional paid premium requests enabled."));
|
|
603
603
|
}
|
|
604
604
|
else {
|
|
605
|
-
overageLabel.textContent = ( localize(
|
|
605
|
+
overageLabel.textContent = ( localize(5532, "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(5533, "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(5534, "{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(5535, "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(5536, "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(5537, "Hide suggestions for 5 min"));
|
|
739
739
|
timerDisplay.title = '';
|
|
740
740
|
button.label = label;
|
|
741
|
-
button.setTitle(( localize(
|
|
741
|
+
button.setTitle(( localize(5538, "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(5539, "remaining"))}`;
|
|
748
|
+
timerDisplay.title = ( localize(5540, "Inline suggestions are hidden for the remaining duration"));
|
|
749
|
+
button.label = ( localize(5541, "+5 min"));
|
|
750
|
+
button.setTitle(( localize(5542, "Snooze additional 5 min")));
|
|
751
751
|
toolbar.push([cancelAction], { icon: true, label: false });
|
|
752
752
|
return false;
|
|
753
753
|
};
|
|
@@ -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(5588, 'There is a chat agent hover part here.');
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
ChatAgentHoverParticipant = ( __decorate([
|
package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsConfirmationService.js
CHANGED
|
@@ -24,8 +24,8 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quic
|
|
|
24
24
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
25
25
|
import { ToolConfirmKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService';
|
|
26
26
|
|
|
27
|
-
const RUN_WITHOUT_APPROVAL = ( localize(
|
|
28
|
-
const CONTINUE_WITHOUT_REVIEWING_RESULTS = ( localize(
|
|
27
|
+
const RUN_WITHOUT_APPROVAL = ( localize(5591, "without approval"));
|
|
28
|
+
const CONTINUE_WITHOUT_REVIEWING_RESULTS = ( localize(5592, "without reviewing result"));
|
|
29
29
|
class GenericConfirmStore extends Disposable {
|
|
30
30
|
constructor(_storageKey, _instantiationService) {
|
|
31
31
|
super();
|
|
@@ -222,23 +222,23 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
222
222
|
return actions;
|
|
223
223
|
}
|
|
224
224
|
actions.push({
|
|
225
|
-
label: ( localize(
|
|
226
|
-
detail: ( localize(
|
|
225
|
+
label: ( localize(5593, 'Allow in this Session')),
|
|
226
|
+
detail: ( localize(5594, 'Allow this tool to run in this session without confirmation.')),
|
|
227
227
|
divider: !!actions.length,
|
|
228
228
|
select: async () => {
|
|
229
229
|
this._preExecutionToolConfirmStore.setAutoConfirmation(ref.toolId, 'session');
|
|
230
230
|
return true;
|
|
231
231
|
}
|
|
232
232
|
}, {
|
|
233
|
-
label: ( localize(
|
|
234
|
-
detail: ( localize(
|
|
233
|
+
label: ( localize(5595, 'Allow in this Workspace')),
|
|
234
|
+
detail: ( localize(5596, 'Allow this tool to run in this workspace without confirmation.')),
|
|
235
235
|
select: async () => {
|
|
236
236
|
this._preExecutionToolConfirmStore.setAutoConfirmation(ref.toolId, 'workspace');
|
|
237
237
|
return true;
|
|
238
238
|
}
|
|
239
239
|
}, {
|
|
240
|
-
label: ( localize(
|
|
241
|
-
detail: ( localize(
|
|
240
|
+
label: ( localize(5597, 'Always Allow')),
|
|
241
|
+
detail: ( localize(5598, 'Always allow this tool to run without confirmation.')),
|
|
242
242
|
select: async () => {
|
|
243
243
|
this._preExecutionToolConfirmStore.setAutoConfirmation(ref.toolId, 'profile');
|
|
244
244
|
return true;
|
|
@@ -247,9 +247,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
247
247
|
if (ref.source.type === 'mcp') {
|
|
248
248
|
const { serverLabel, definitionId } = ref.source;
|
|
249
249
|
actions.push({
|
|
250
|
-
label: ( localize(
|
|
250
|
+
label: ( localize(5599, 'Allow Tools from {0} in this Session', serverLabel)),
|
|
251
251
|
detail: ( localize(
|
|
252
|
-
|
|
252
|
+
5600,
|
|
253
253
|
'Allow all tools from this server to run in this session without confirmation.'
|
|
254
254
|
)),
|
|
255
255
|
divider: true,
|
|
@@ -258,9 +258,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
258
258
|
return true;
|
|
259
259
|
}
|
|
260
260
|
}, {
|
|
261
|
-
label: ( localize(
|
|
261
|
+
label: ( localize(5601, 'Allow Tools from {0} in this Workspace', serverLabel)),
|
|
262
262
|
detail: ( localize(
|
|
263
|
-
|
|
263
|
+
5602,
|
|
264
264
|
'Allow all tools from this server to run in this workspace without confirmation.'
|
|
265
265
|
)),
|
|
266
266
|
select: async () => {
|
|
@@ -268,9 +268,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
268
268
|
return true;
|
|
269
269
|
}
|
|
270
270
|
}, {
|
|
271
|
-
label: ( localize(
|
|
271
|
+
label: ( localize(5603, 'Always Allow Tools from {0}', serverLabel)),
|
|
272
272
|
detail: ( localize(
|
|
273
|
-
|
|
273
|
+
5604,
|
|
274
274
|
'Always allow all tools from this server to run without confirmation.'
|
|
275
275
|
)),
|
|
276
276
|
select: async () => {
|
|
@@ -291,9 +291,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
291
291
|
return actions;
|
|
292
292
|
}
|
|
293
293
|
actions.push({
|
|
294
|
-
label: ( localize(
|
|
294
|
+
label: ( localize(5605, 'Allow Without Review in this Session')),
|
|
295
295
|
detail: ( localize(
|
|
296
|
-
|
|
296
|
+
5606,
|
|
297
297
|
'Allow results from this tool to be sent without confirmation in this session.'
|
|
298
298
|
)),
|
|
299
299
|
divider: !!actions.length,
|
|
@@ -302,9 +302,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
302
302
|
return true;
|
|
303
303
|
}
|
|
304
304
|
}, {
|
|
305
|
-
label: ( localize(
|
|
305
|
+
label: ( localize(5607, 'Allow Without Review in this Workspace')),
|
|
306
306
|
detail: ( localize(
|
|
307
|
-
|
|
307
|
+
5608,
|
|
308
308
|
'Allow results from this tool to be sent without confirmation in this workspace.'
|
|
309
309
|
)),
|
|
310
310
|
select: async () => {
|
|
@@ -312,9 +312,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
312
312
|
return true;
|
|
313
313
|
}
|
|
314
314
|
}, {
|
|
315
|
-
label: ( localize(
|
|
315
|
+
label: ( localize(5609, 'Always Allow Without Review')),
|
|
316
316
|
detail: ( localize(
|
|
317
|
-
|
|
317
|
+
5610,
|
|
318
318
|
'Always allow results from this tool to be sent without confirmation.'
|
|
319
319
|
)),
|
|
320
320
|
select: async () => {
|
|
@@ -325,9 +325,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
325
325
|
if (ref.source.type === 'mcp') {
|
|
326
326
|
const { serverLabel, definitionId } = ref.source;
|
|
327
327
|
actions.push({
|
|
328
|
-
label: ( localize(
|
|
328
|
+
label: ( localize(5611, 'Allow Tools from {0} Without Review in this Session', serverLabel)),
|
|
329
329
|
detail: ( localize(
|
|
330
|
-
|
|
330
|
+
5612,
|
|
331
331
|
'Allow results from all tools from this server to be sent without confirmation in this session.'
|
|
332
332
|
)),
|
|
333
333
|
divider: true,
|
|
@@ -336,9 +336,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
336
336
|
return true;
|
|
337
337
|
}
|
|
338
338
|
}, {
|
|
339
|
-
label: ( localize(
|
|
339
|
+
label: ( localize(5613, 'Allow Tools from {0} Without Review in this Workspace', serverLabel)),
|
|
340
340
|
detail: ( localize(
|
|
341
|
-
|
|
341
|
+
5614,
|
|
342
342
|
'Allow results from all tools from this server to be sent without confirmation in this workspace.'
|
|
343
343
|
)),
|
|
344
344
|
select: async () => {
|
|
@@ -346,9 +346,9 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
346
346
|
return true;
|
|
347
347
|
}
|
|
348
348
|
}, {
|
|
349
|
-
label: ( localize(
|
|
349
|
+
label: ( localize(5615, 'Always Allow Tools from {0} Without Review', serverLabel)),
|
|
350
350
|
detail: ( localize(
|
|
351
|
-
|
|
351
|
+
5616,
|
|
352
352
|
'Always allow results from all tools from this server to be sent without confirmation.'
|
|
353
353
|
)),
|
|
354
354
|
select: async () => {
|
|
@@ -482,7 +482,7 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
482
482
|
type: 'server-post',
|
|
483
483
|
serverId,
|
|
484
484
|
iconClass: ThemeIcon.asClassName(Codicon.play),
|
|
485
|
-
label: ( localize(
|
|
485
|
+
label: ( localize(5617, "Continue without reviewing any tool results")),
|
|
486
486
|
checked: serverPostConfirmed
|
|
487
487
|
});
|
|
488
488
|
}
|
|
@@ -491,7 +491,7 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
491
491
|
type: 'server-pre',
|
|
492
492
|
serverId,
|
|
493
493
|
iconClass: ThemeIcon.asClassName(Codicon.play),
|
|
494
|
-
label: ( localize(
|
|
494
|
+
label: ( localize(5618, "Run any tool without approval")),
|
|
495
495
|
checked: serverPreConfirmed
|
|
496
496
|
});
|
|
497
497
|
}
|
|
@@ -595,7 +595,7 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
595
595
|
quickTree.sortByLabel = false;
|
|
596
596
|
if (currentScope !== 'session') {
|
|
597
597
|
const scopeToggle = disposables.add(( new Toggle({
|
|
598
|
-
title: ( localize(
|
|
598
|
+
title: ( localize(5619, "Configure for this workspace only")),
|
|
599
599
|
icon: Codicon.folder,
|
|
600
600
|
isChecked: currentScope === 'workspace',
|
|
601
601
|
inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),
|
|
@@ -611,12 +611,12 @@ let LanguageModelToolsConfirmationService = class LanguageModelToolsConfirmation
|
|
|
611
611
|
}
|
|
612
612
|
const updatePlaceholder = () => {
|
|
613
613
|
if (currentScope === 'session') {
|
|
614
|
-
quickTree.placeholder = ( localize(
|
|
614
|
+
quickTree.placeholder = ( localize(5620, "Configure session tool approvals"));
|
|
615
615
|
}
|
|
616
616
|
else {
|
|
617
617
|
quickTree.placeholder = currentScope === 'workspace'
|
|
618
|
-
? ( localize(
|
|
619
|
-
: ( localize(
|
|
618
|
+
? ( localize(5621, "Configure workspace tool approvals"))
|
|
619
|
+
: ( localize(5622, "Configure global tool approvals"));
|
|
620
620
|
}
|
|
621
621
|
};
|
|
622
622
|
updatePlaceholder();
|
|
@@ -49,7 +49,7 @@ var AutoApproveStorageKeys;
|
|
|
49
49
|
})(AutoApproveStorageKeys || (AutoApproveStorageKeys = {}));
|
|
50
50
|
const SkipAutoApproveConfirmationKey = 'vscode.chat.tools.global.autoApprove.testMode';
|
|
51
51
|
const globalAutoApproveDescription = ( localize2(
|
|
52
|
-
|
|
52
|
+
5623,
|
|
53
53
|
'Global auto approve also known as "YOLO mode" disables manual approval completely for _all tools in all workspaces_, allowing the agent to act fully autonomously. This is extremely dangerous and is *never* recommended, even containerized environments like [Codespaces](https://github.com/features/codespaces) and [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) have user keys forwarded into the container that could be compromised.\n\n**This feature disables [critical security protections](https://code.visualstudio.com/docs/copilot/security) and makes it much easier for an attacker to compromise the machine.**'
|
|
54
54
|
));
|
|
55
55
|
let LanguageModelToolsService = class LanguageModelToolsService extends Disposable {
|
|
@@ -380,10 +380,10 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
380
380
|
const toolReferenceName = getToolReferenceName(tool.data);
|
|
381
381
|
prepared.confirmationMessages = {
|
|
382
382
|
...prepared.confirmationMessages,
|
|
383
|
-
title: ( localize(
|
|
384
|
-
message: ( localize(
|
|
383
|
+
title: ( localize(5624, 'Allow tool to execute?')),
|
|
384
|
+
message: ( localize(5625, 'Run the \'{0}\' tool?', toolReferenceName)),
|
|
385
385
|
disclaimer: ( new MarkdownString(( localize(
|
|
386
|
-
|
|
386
|
+
5626,
|
|
387
387
|
'Auto approval for \'{0}\' is restricted via {1}.',
|
|
388
388
|
getToolReferenceName(tool.data),
|
|
389
389
|
markdownCommandLink({ title: '`' + ChatConfiguration.EligibleForAutoApproval + '`', id: 'workbench.action.openSettings', arguments: [ChatConfiguration.EligibleForAutoApproval] }, false)
|
|
@@ -393,7 +393,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
393
393
|
}
|
|
394
394
|
if (!isEligibleForAutoApproval && prepared?.confirmationMessages?.title) {
|
|
395
395
|
prepared.confirmationMessages.disclaimer = ( new MarkdownString(( localize(
|
|
396
|
-
|
|
396
|
+
5626,
|
|
397
397
|
'Auto approval for \'{0}\' is restricted via {1}.',
|
|
398
398
|
getToolReferenceName(tool.data),
|
|
399
399
|
markdownCommandLink({ title: '`' + ChatConfiguration.EligibleForAutoApproval + '`', id: 'workbench.action.openSettings', arguments: [ChatConfiguration.EligibleForAutoApproval] }, false)
|
|
@@ -514,14 +514,14 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
514
514
|
}
|
|
515
515
|
const promptResult = await this._dialogService.prompt({
|
|
516
516
|
type: Severity.Warning,
|
|
517
|
-
message: ( localize(
|
|
517
|
+
message: ( localize(5627, 'Enable global auto approve?')),
|
|
518
518
|
buttons: [
|
|
519
519
|
{
|
|
520
|
-
label: ( localize(
|
|
520
|
+
label: ( localize(5628, 'Enable')),
|
|
521
521
|
run: () => true
|
|
522
522
|
},
|
|
523
523
|
{
|
|
524
|
-
label: ( localize(
|
|
524
|
+
label: ( localize(5629, 'Disable')),
|
|
525
525
|
run: () => false
|
|
526
526
|
},
|
|
527
527
|
],
|