@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
|
@@ -15,11 +15,11 @@ import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
15
15
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
16
16
|
import { ExtensionEditorTab } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions';
|
|
17
17
|
import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
|
|
18
|
-
import { McpCommandIds } from '@codingame/monaco-vscode-
|
|
18
|
+
import { McpCommandIds } from '@codingame/monaco-vscode-08fd81c0-7fd8-5f7c-9776-f918dd532714-common/vscode/vs/workbench/contrib/mcp/common/mcpCommandIds';
|
|
19
19
|
import { IMcpRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service';
|
|
20
20
|
import { McpServerEditorTab, McpConnectionState, McpServerCacheState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
|
|
21
21
|
import { IMcpService, IMcpWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
|
|
22
|
-
import { startServerAndWaitForLiveTools } from '@codingame/monaco-vscode-
|
|
22
|
+
import { startServerAndWaitForLiveTools } from '@codingame/monaco-vscode-08fd81c0-7fd8-5f7c-9776-f918dd532714-common/vscode/vs/workbench/contrib/mcp/common/mcpTypesUtils';
|
|
23
23
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
24
24
|
import { ToolDataSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService';
|
|
25
25
|
import { ILanguageModelToolsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
@@ -77,7 +77,7 @@ function createToolSetTreeItem(toolset, checked, editorService) {
|
|
|
77
77
|
const resource = toolset.source.file;
|
|
78
78
|
buttons.push({
|
|
79
79
|
iconClass: ThemeIcon.asClassName(Codicon.edit),
|
|
80
|
-
tooltip: ( localize(
|
|
80
|
+
tooltip: ( localize(4794, "Edit Tool Set")),
|
|
81
81
|
action: () => editorService.openEditor({ resource })
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -158,14 +158,14 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
158
158
|
if (collection?.source) {
|
|
159
159
|
buttons.push({
|
|
160
160
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
161
|
-
tooltip: ( localize(
|
|
161
|
+
tooltip: ( localize(4795, "Configure {0}", collection.label)),
|
|
162
162
|
action: () => collection.source ? collection.source instanceof ExtensionIdentifier ? extensionsWorkbenchService.open(collection.source.value, { tab: ExtensionEditorTab.Features, feature: 'mcp' }) : mcpWorkbenchService.open(collection.source, { tab: McpServerEditorTab.Configuration }) : undefined
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
else if (collection?.presentation?.origin) {
|
|
166
166
|
buttons.push({
|
|
167
167
|
iconClass: ThemeIcon.asClassName(Codicon.settingsGear),
|
|
168
|
-
tooltip: ( localize(
|
|
168
|
+
tooltip: ( localize(4795, "Configure {0}", collection.label)),
|
|
169
169
|
action: () => editorService.openEditor({
|
|
170
170
|
resource: collection.presentation.origin,
|
|
171
171
|
})
|
|
@@ -174,7 +174,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
174
174
|
if (mcpServer.connectionState.get().state === McpConnectionState.Kind.Error) {
|
|
175
175
|
buttons.push({
|
|
176
176
|
iconClass: ThemeIcon.asClassName(Codicon.warning),
|
|
177
|
-
tooltip: ( localize(
|
|
177
|
+
tooltip: ( localize(4796, "Show Output")),
|
|
178
178
|
action: () => mcpServer.showOutput(),
|
|
179
179
|
});
|
|
180
180
|
}
|
|
@@ -186,7 +186,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
186
186
|
children.push({
|
|
187
187
|
itemType: 'callback',
|
|
188
188
|
iconClass: ThemeIcon.asClassName(Codicon.sync),
|
|
189
|
-
label: ( localize(
|
|
189
|
+
label: ( localize(4797, "Update Tools")),
|
|
190
190
|
pickable: false,
|
|
191
191
|
run: () => {
|
|
192
192
|
treePicker.busy = true;
|
|
@@ -243,7 +243,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
243
243
|
itemType: 'bucket',
|
|
244
244
|
ordinal: BucketOrdinal.BuiltIn,
|
|
245
245
|
id: key,
|
|
246
|
-
label: ( localize(
|
|
246
|
+
label: ( localize(4798, "Built-In")),
|
|
247
247
|
checked: undefined,
|
|
248
248
|
children: [],
|
|
249
249
|
buttons: [],
|
|
@@ -256,7 +256,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
256
256
|
itemType: 'bucket',
|
|
257
257
|
ordinal: BucketOrdinal.User,
|
|
258
258
|
id: key,
|
|
259
|
-
label: ( localize(
|
|
259
|
+
label: ( localize(4799, "User Defined Tool Sets")),
|
|
260
260
|
checked: undefined,
|
|
261
261
|
children: [],
|
|
262
262
|
buttons: [],
|
|
@@ -339,7 +339,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
if (treeItems.length === 0) {
|
|
342
|
-
treePicker.placeholder = ( localize(
|
|
342
|
+
treePicker.placeholder = ( localize(4800, "Add tools to chat"));
|
|
343
343
|
}
|
|
344
344
|
else {
|
|
345
345
|
treePicker.placeholder = placeHolder;
|
|
@@ -380,7 +380,7 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
380
380
|
if (count > toolLimit) {
|
|
381
381
|
treePicker.severity = Severity.Warning;
|
|
382
382
|
treePicker.validationMessage = ( localize(
|
|
383
|
-
|
|
383
|
+
4801,
|
|
384
384
|
"{0} tools are enabled. You may experience degraded tool calling above {1} tools.",
|
|
385
385
|
count,
|
|
386
386
|
markdownCommandLink({ title: String(toolLimit), id: '_chat.toolPicker.closeAndOpenVirtualThreshold' })
|
|
@@ -443,17 +443,17 @@ async function showToolsPicker(accessor, placeHolder, description, getToolsEntri
|
|
|
443
443
|
}));
|
|
444
444
|
const addMcpServerButton = {
|
|
445
445
|
iconClass: ThemeIcon.asClassName(Codicon.mcp),
|
|
446
|
-
tooltip: ( localize(
|
|
446
|
+
tooltip: ( localize(4802, 'Add MCP Server...'))
|
|
447
447
|
};
|
|
448
448
|
const installExtension = {
|
|
449
449
|
iconClass: ThemeIcon.asClassName(Codicon.extensions),
|
|
450
|
-
tooltip: ( localize(
|
|
450
|
+
tooltip: ( localize(4803, 'Install Extension...'))
|
|
451
451
|
};
|
|
452
452
|
const configureToolSets = {
|
|
453
453
|
iconClass: ThemeIcon.asClassName(Codicon.gear),
|
|
454
|
-
tooltip: ( localize(
|
|
454
|
+
tooltip: ( localize(4804, 'Configure Tool Sets...'))
|
|
455
455
|
};
|
|
456
|
-
treePicker.title = ( localize(
|
|
456
|
+
treePicker.title = ( localize(4805, "Configure Tools"));
|
|
457
457
|
treePicker.buttons = [addMcpServerButton, installExtension, configureToolSets];
|
|
458
458
|
store.add(treePicker.onDidTriggerButton(button => {
|
|
459
459
|
if (button === addMcpServerButton) {
|
|
@@ -59,7 +59,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
59
59
|
}
|
|
60
60
|
else {
|
|
61
61
|
this.notify(( localize(
|
|
62
|
-
|
|
62
|
+
4806,
|
|
63
63
|
"To insert the code block, open a code editor or notebook editor and set the cursor at the location where to insert the code block."
|
|
64
64
|
)));
|
|
65
65
|
}
|
|
@@ -92,7 +92,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
92
92
|
}
|
|
93
93
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
94
94
|
if (notebookEditor.isReadOnly) {
|
|
95
|
-
this.notify(( localize(
|
|
95
|
+
this.notify(( localize(4807, "Cannot insert the code block to read-only notebook editor.")));
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
98
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -103,7 +103,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
103
103
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
104
104
|
const activeModel = codeEditor.getModel();
|
|
105
105
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
106
|
-
this.notify(( localize(
|
|
106
|
+
this.notify(( localize(4808, "Cannot insert the code block to read-only code editor.")));
|
|
107
107
|
return false;
|
|
108
108
|
}
|
|
109
109
|
const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
|
|
@@ -157,7 +157,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
157
157
|
activeEditorControl = codeEditor;
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
|
-
this.notify(( localize(
|
|
160
|
+
this.notify(( localize(4809, "Failed to open {0} in a code editor.", (codemapperUri.toString()))));
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -183,7 +183,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
183
183
|
result = await this.handleNotebookEditor(activeNotebookEditor, context.chatSessionResource, context.code);
|
|
184
184
|
}
|
|
185
185
|
else {
|
|
186
|
-
this.notify(( localize(
|
|
186
|
+
this.notify(( localize(4810, "To apply this code block, open a code or notebook editor.")));
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
if (isResponseVM(context.element)) {
|
|
@@ -206,15 +206,15 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
206
206
|
return resource;
|
|
207
207
|
}
|
|
208
208
|
const activeEditorOption = activeEditorControl?.getModel().uri ? { label: ( localize(
|
|
209
|
-
|
|
209
|
+
4811,
|
|
210
210
|
"Active editor '{0}'",
|
|
211
211
|
this.labelService.getUriLabel(activeEditorControl.getModel().uri, { relative: true })
|
|
212
212
|
)), id: 'activeEditor' } : undefined;
|
|
213
|
-
const untitledEditorOption = { label: ( localize(
|
|
213
|
+
const untitledEditorOption = { label: ( localize(4812, "New untitled editor")), id: 'newUntitledFile' };
|
|
214
214
|
const options = [];
|
|
215
215
|
if (resource) {
|
|
216
216
|
options.push({ label: ( localize(
|
|
217
|
-
|
|
217
|
+
4813,
|
|
218
218
|
"New file '{0}'",
|
|
219
219
|
this.labelService.getUriLabel(resource, { relative: true })
|
|
220
220
|
)), id: 'createFile' });
|
|
@@ -229,7 +229,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
229
229
|
}
|
|
230
230
|
options.push(untitledEditorOption);
|
|
231
231
|
}
|
|
232
|
-
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(
|
|
232
|
+
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(4814, "Select where to apply the code block")) }) : options[0];
|
|
233
233
|
if (selected) {
|
|
234
234
|
switch (selected.id) {
|
|
235
235
|
case 'createFile':
|
|
@@ -238,7 +238,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
238
238
|
await this.fileService.writeFile(resource, VSBuffer.fromString(''));
|
|
239
239
|
}
|
|
240
240
|
catch (error) {
|
|
241
|
-
this.notify(( localize(
|
|
241
|
+
this.notify(( localize(4815, "Failed to create file: {0}", error.message)));
|
|
242
242
|
return ( URI.from({ scheme: 'untitled', path: resource.path }));
|
|
243
243
|
}
|
|
244
244
|
}
|
|
@@ -253,21 +253,21 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
253
253
|
}
|
|
254
254
|
async handleNotebookEditor(notebookEditor, chatSessionResource, code) {
|
|
255
255
|
if (notebookEditor.isReadOnly) {
|
|
256
|
-
this.notify(( localize(
|
|
256
|
+
this.notify(( localize(4816, "Cannot apply code block to read-only notebook editor.")));
|
|
257
257
|
return undefined;
|
|
258
258
|
}
|
|
259
259
|
const uri = notebookEditor.textModel.uri;
|
|
260
260
|
const codeBlock = { code, resource: uri, markdownBeforeBlock: undefined };
|
|
261
261
|
const codeMapper = this.codeMapperService.providers[0]?.displayName;
|
|
262
262
|
if (!codeMapper) {
|
|
263
|
-
this.notify(( localize(
|
|
263
|
+
this.notify(( localize(4817, "No code mapper available.")));
|
|
264
264
|
return undefined;
|
|
265
265
|
}
|
|
266
266
|
let editsProposed = false;
|
|
267
267
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
268
268
|
try {
|
|
269
269
|
const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
270
|
-
progress.report({ message: ( localize(
|
|
270
|
+
progress.report({ message: ( localize(4818, "Applying code block using {0}...", codeMapper)) });
|
|
271
271
|
const editsIterable = this.getNotebookEdits(codeBlock, chatSessionResource, cancellationTokenSource.token);
|
|
272
272
|
return await this.waitForFirstElement(editsIterable);
|
|
273
273
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -275,7 +275,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
275
275
|
}
|
|
276
276
|
catch (e) {
|
|
277
277
|
if (!isCancellationError(e)) {
|
|
278
|
-
this.notify(( localize(
|
|
278
|
+
this.notify(( localize(4819, "Failed to apply code block: {0}", e.message)));
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
finally {
|
|
@@ -289,20 +289,20 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
289
289
|
async handleTextEditor(codeEditor, chatSessionResource, code, applyCodeBlockSuggestionId) {
|
|
290
290
|
const activeModel = codeEditor.getModel();
|
|
291
291
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
292
|
-
this.notify(( localize(
|
|
292
|
+
this.notify(( localize(4820, "Cannot apply code block to read-only file.")));
|
|
293
293
|
return undefined;
|
|
294
294
|
}
|
|
295
295
|
const codeBlock = { code, resource: activeModel.uri, chatSessionResource, markdownBeforeBlock: undefined };
|
|
296
296
|
const codeMapper = this.codeMapperService.providers[0]?.displayName;
|
|
297
297
|
if (!codeMapper) {
|
|
298
|
-
this.notify(( localize(
|
|
298
|
+
this.notify(( localize(4817, "No code mapper available.")));
|
|
299
299
|
return undefined;
|
|
300
300
|
}
|
|
301
301
|
let editsProposed = false;
|
|
302
302
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
303
303
|
try {
|
|
304
304
|
const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
305
|
-
progress.report({ message: ( localize(
|
|
305
|
+
progress.report({ message: ( localize(4818, "Applying code block using {0}...", codeMapper)) });
|
|
306
306
|
const editsIterable = this.getTextEdits(codeBlock, chatSessionResource, cancellationTokenSource.token);
|
|
307
307
|
return await this.waitForFirstElement(editsIterable);
|
|
308
308
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -310,7 +310,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
310
310
|
}
|
|
311
311
|
catch (e) {
|
|
312
312
|
if (!isCancellationError(e)) {
|
|
313
|
-
this.notify(( localize(
|
|
313
|
+
this.notify(( localize(4819, "Failed to apply code block: {0}", e.message)));
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
finally {
|
|
@@ -94,13 +94,13 @@ let AgentSessionsViewModel = class AgentSessionsViewModel extends Disposable {
|
|
|
94
94
|
else {
|
|
95
95
|
switch (session.status) {
|
|
96
96
|
case ChatSessionStatus.InProgress:
|
|
97
|
-
description = ( localize(
|
|
97
|
+
description = ( localize(4822, "Working..."));
|
|
98
98
|
break;
|
|
99
99
|
case ChatSessionStatus.Failed:
|
|
100
|
-
description = ( localize(
|
|
100
|
+
description = ( localize(4823, "Failed"));
|
|
101
101
|
break;
|
|
102
102
|
default:
|
|
103
|
-
description = ( localize(
|
|
103
|
+
description = ( localize(4824, "Finished"));
|
|
104
104
|
break;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -108,15 +108,15 @@ let AgentSessionsViewModel = class AgentSessionsViewModel extends Disposable {
|
|
|
108
108
|
let providerLabel;
|
|
109
109
|
switch ((provider.chatSessionType)) {
|
|
110
110
|
case localChatSessionType:
|
|
111
|
-
providerLabel = ( localize(
|
|
111
|
+
providerLabel = ( localize(4825, "Local"));
|
|
112
112
|
icon = Codicon.window;
|
|
113
113
|
break;
|
|
114
114
|
case AgentSessionProviders.Background:
|
|
115
|
-
providerLabel = ( localize(
|
|
115
|
+
providerLabel = ( localize(4826, "Background"));
|
|
116
116
|
icon = Codicon.layers;
|
|
117
117
|
break;
|
|
118
118
|
case AgentSessionProviders.Cloud:
|
|
119
|
-
providerLabel = ( localize(
|
|
119
|
+
providerLabel = ( localize(4827, "Cloud"));
|
|
120
120
|
icon = Codicon.cloud;
|
|
121
121
|
break;
|
|
122
122
|
default: {
|
|
@@ -144,7 +144,7 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
144
144
|
constructor() {
|
|
145
145
|
super({
|
|
146
146
|
id: 'agentSessionsView.refresh',
|
|
147
|
-
title: ( localize2(
|
|
147
|
+
title: ( localize2(4828, "Refresh Agent Sessions")),
|
|
148
148
|
icon: Codicon.refresh,
|
|
149
149
|
menu: {
|
|
150
150
|
id: MenuId.ViewTitle,
|
|
@@ -163,7 +163,7 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
163
163
|
constructor() {
|
|
164
164
|
super({
|
|
165
165
|
id: 'agentSessionsView.find',
|
|
166
|
-
title: ( localize2(
|
|
166
|
+
title: ( localize2(4829, "Find Agent Session")),
|
|
167
167
|
icon: Codicon.search,
|
|
168
168
|
menu: {
|
|
169
169
|
id: MenuId.ViewTitle,
|
|
@@ -182,8 +182,8 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
182
182
|
createNewSessionButton(container) {
|
|
183
183
|
this.newSessionContainer = append(container, $('.agent-sessions-new-session-container'));
|
|
184
184
|
const newSessionButton = this._register(( new ButtonWithDropdown(this.newSessionContainer, {
|
|
185
|
-
title: ( localize(
|
|
186
|
-
ariaLabel: ( localize(
|
|
185
|
+
title: ( localize(4830, "New Session")),
|
|
186
|
+
ariaLabel: ( localize(4831, "New Session")),
|
|
187
187
|
contextMenuProvider: this.contextMenuService,
|
|
188
188
|
actions: {
|
|
189
189
|
getActions: () => {
|
|
@@ -193,24 +193,24 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
193
193
|
addPrimaryActionToDropdown: false,
|
|
194
194
|
...defaultButtonStyles,
|
|
195
195
|
})));
|
|
196
|
-
newSessionButton.label = ( localize(
|
|
196
|
+
newSessionButton.label = ( localize(4830, "New Session"));
|
|
197
197
|
this._register(newSessionButton.onDidClick(() => this.commandService.executeCommand(ACTION_ID_OPEN_CHAT)));
|
|
198
198
|
}
|
|
199
199
|
getNewSessionActions() {
|
|
200
200
|
const actions = [];
|
|
201
201
|
actions.push(toAction({
|
|
202
202
|
id: 'newChatSession.default',
|
|
203
|
-
label: ( localize(
|
|
203
|
+
label: ( localize(4832, "New Local Session")),
|
|
204
204
|
run: () => this.commandService.executeCommand(ACTION_ID_OPEN_CHAT)
|
|
205
205
|
}));
|
|
206
206
|
actions.push(toAction({
|
|
207
207
|
id: 'newChatSessionFromProvider.background',
|
|
208
|
-
label: ( localize(
|
|
208
|
+
label: ( localize(4833, "New Background Session")),
|
|
209
209
|
run: () => this.commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${AgentSessionProviders.Background}`)
|
|
210
210
|
}));
|
|
211
211
|
actions.push(toAction({
|
|
212
212
|
id: 'newChatSessionFromProvider.cloud',
|
|
213
|
-
label: ( localize(
|
|
213
|
+
label: ( localize(4834, "New Cloud Session")),
|
|
214
214
|
run: () => this.commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${AgentSessionProviders.Cloud}`)
|
|
215
215
|
}));
|
|
216
216
|
let addedSeparator = false;
|
|
@@ -232,7 +232,7 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
232
232
|
else {
|
|
233
233
|
actions.push(toAction({
|
|
234
234
|
id: `newChatSessionFromProvider.${provider.type}`,
|
|
235
|
-
label: ( localize(
|
|
235
|
+
label: ( localize(4835, "New {0}", provider.displayName)),
|
|
236
236
|
run: () => this.commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${provider.type}`)
|
|
237
237
|
}));
|
|
238
238
|
}
|
|
@@ -240,7 +240,7 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
240
240
|
actions.push(( new Separator()));
|
|
241
241
|
actions.push(toAction({
|
|
242
242
|
id: 'install-extensions',
|
|
243
|
-
label: ( localize(
|
|
243
|
+
label: ( localize(4836, "Install Chat Extensions...")),
|
|
244
244
|
run: () => this.commandService.executeCommand('chat.sessions.gettingStarted')
|
|
245
245
|
}));
|
|
246
246
|
return actions;
|
|
@@ -276,7 +276,7 @@ let AgentSessionsView = class AgentSessionsView extends ViewPane {
|
|
|
276
276
|
didResolveDisposable.value = Event.once(sessionsViewModel.onDidResolve)(() => didResolve.complete());
|
|
277
277
|
this.progressService.withProgress({
|
|
278
278
|
location: this.id,
|
|
279
|
-
title: ( localize(
|
|
279
|
+
title: ( localize(4837, 'Refreshing agent sessions...')),
|
|
280
280
|
delay: 500
|
|
281
281
|
}, () => didResolve.p);
|
|
282
282
|
}));
|
|
@@ -314,7 +314,7 @@ AgentSessionsView = ( __decorate([
|
|
|
314
314
|
( __param(17, IChatWidgetService))
|
|
315
315
|
], AgentSessionsView));
|
|
316
316
|
const chatAgentsIcon = registerIcon('chat-sessions-icon', Codicon.commentDiscussionSparkle, 'Icon for Agent Sessions View');
|
|
317
|
-
const AGENT_SESSIONS_VIEW_TITLE = ( localize2(
|
|
317
|
+
const AGENT_SESSIONS_VIEW_TITLE = ( localize2(4838, "Agent Sessions"));
|
|
318
318
|
const agentSessionsViewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
319
319
|
id: AGENT_SESSIONS_VIEW_CONTAINER_ID,
|
|
320
320
|
title: AGENT_SESSIONS_VIEW_TITLE,
|
|
@@ -168,7 +168,7 @@ class AgentSessionsListDelegate {
|
|
|
168
168
|
}
|
|
169
169
|
class AgentSessionsAccessibilityProvider {
|
|
170
170
|
getWidgetAriaLabel() {
|
|
171
|
-
return localize(
|
|
171
|
+
return localize(4839, "Agent Sessions");
|
|
172
172
|
}
|
|
173
173
|
getAriaLabel(element) {
|
|
174
174
|
return element.label;
|
|
@@ -236,7 +236,7 @@ let AgentSessionsDragAndDrop = class AgentSessionsDragAndDrop extends Disposable
|
|
|
236
236
|
if (elements.length === 1) {
|
|
237
237
|
return elements[0].label;
|
|
238
238
|
}
|
|
239
|
-
return localize(
|
|
239
|
+
return localize(4840, "{0} agent sessions", elements.length);
|
|
240
240
|
}
|
|
241
241
|
onDragOver(data, targetElement, targetIndex, targetSector, originalEvent) {
|
|
242
242
|
return false;
|