@codingame/monaco-vscode-chat-service-override 14.0.3 → 14.0.5
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 +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +24 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.js +1 -1
- 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/chatMoveActions.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/codeBlockOperations.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +21 -21
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +47 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +17 -17
- 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/inlineChatController2.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatCurrentLine.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-chat-service-override",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - chat service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,25 +15,25 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "14.0.
|
|
19
|
-
"@codingame/monaco-vscode-168b98e5-dc20-5807-b1f9-798f1f92b37f-common": "14.0.
|
|
20
|
-
"@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "14.0.
|
|
21
|
-
"@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common": "14.0.
|
|
22
|
-
"@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common": "14.0.
|
|
23
|
-
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "14.0.
|
|
24
|
-
"@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "14.0.
|
|
25
|
-
"@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.
|
|
26
|
-
"@codingame/monaco-vscode-9e30237f-37af-5bbd-8bc1-5c4f2c0714b3-common": "14.0.
|
|
27
|
-
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.
|
|
28
|
-
"@codingame/monaco-vscode-api": "14.0.
|
|
29
|
-
"@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "14.0.
|
|
30
|
-
"@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "14.0.
|
|
31
|
-
"@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "14.0.
|
|
32
|
-
"@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "14.0.
|
|
33
|
-
"@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "14.0.
|
|
34
|
-
"@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common": "14.0.
|
|
35
|
-
"@codingame/monaco-vscode-eea37658-2307-56a5-8ed0-b2752c7b7a50-common": "14.0.
|
|
36
|
-
"@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "14.0.
|
|
18
|
+
"@codingame/monaco-vscode-1021b67c-93e5-5c78-a270-cbdb2574d980-common": "14.0.5",
|
|
19
|
+
"@codingame/monaco-vscode-168b98e5-dc20-5807-b1f9-798f1f92b37f-common": "14.0.5",
|
|
20
|
+
"@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common": "14.0.5",
|
|
21
|
+
"@codingame/monaco-vscode-4a28f637-7c3c-5e48-a77c-1b7538b38850-common": "14.0.5",
|
|
22
|
+
"@codingame/monaco-vscode-5945a5e2-a66c-5a82-bd2c-1965724b29eb-common": "14.0.5",
|
|
23
|
+
"@codingame/monaco-vscode-65619f8f-0eab-5d8b-855a-43b6353fe527-common": "14.0.5",
|
|
24
|
+
"@codingame/monaco-vscode-8c844347-a703-5de1-9eeb-5e0c7f503a58-common": "14.0.5",
|
|
25
|
+
"@codingame/monaco-vscode-91789cdf-e3cb-5a04-aaeb-6f7df7d3d231-common": "14.0.5",
|
|
26
|
+
"@codingame/monaco-vscode-9e30237f-37af-5bbd-8bc1-5c4f2c0714b3-common": "14.0.5",
|
|
27
|
+
"@codingame/monaco-vscode-a7c9ae3c-16d2-5d17-86b2-981be7094566-common": "14.0.5",
|
|
28
|
+
"@codingame/monaco-vscode-api": "14.0.5",
|
|
29
|
+
"@codingame/monaco-vscode-c465110a-57c0-59d7-a6b2-be0a4db7e517-common": "14.0.5",
|
|
30
|
+
"@codingame/monaco-vscode-d0fb86d3-2a47-594e-955b-9a24631a7124-common": "14.0.5",
|
|
31
|
+
"@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "14.0.5",
|
|
32
|
+
"@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "14.0.5",
|
|
33
|
+
"@codingame/monaco-vscode-ea14e352-8f1c-5569-b79a-8a96a53e8abe-common": "14.0.5",
|
|
34
|
+
"@codingame/monaco-vscode-ecf3436d-6064-5fbd-a760-37a211ce79c7-common": "14.0.5",
|
|
35
|
+
"@codingame/monaco-vscode-eea37658-2307-56a5-8ed0-b2752c7b7a50-common": "14.0.5",
|
|
36
|
+
"@codingame/monaco-vscode-fab30422-b487-5f4e-8d30-8b4d266e3fcd-common": "14.0.5"
|
|
37
37
|
},
|
|
38
38
|
"main": "index.js",
|
|
39
39
|
"module": "index.js",
|
|
@@ -81,7 +81,7 @@ let CodeBlockActionRendering = class CodeBlockActionRendering extends Disposable
|
|
|
81
81
|
const context = this._context;
|
|
82
82
|
if (isCodeBlockActionContext(context) && context.codemapperUri) {
|
|
83
83
|
const label = labelService.getUriLabel(context.codemapperUri, { relative: true });
|
|
84
|
-
return localize(
|
|
84
|
+
return localize(4271, "Apply to {0}", label);
|
|
85
85
|
}
|
|
86
86
|
return super.getTooltip();
|
|
87
87
|
}
|
|
@@ -104,7 +104,7 @@ function registerChatCodeBlockActions() {
|
|
|
104
104
|
constructor() {
|
|
105
105
|
super({
|
|
106
106
|
id: 'workbench.action.chat.copyCodeBlock',
|
|
107
|
-
title: ( localize2(
|
|
107
|
+
title: ( localize2(4272, "Copy")),
|
|
108
108
|
f1: false,
|
|
109
109
|
category: CHAT_CATEGORY,
|
|
110
110
|
icon: Codicon.copy,
|
|
@@ -189,7 +189,7 @@ function registerChatCodeBlockActions() {
|
|
|
189
189
|
constructor() {
|
|
190
190
|
super({
|
|
191
191
|
id: APPLY_IN_EDITOR_ID,
|
|
192
|
-
title: ( localize2(
|
|
192
|
+
title: ( localize2(4273, "Apply in Editor")),
|
|
193
193
|
precondition: ChatContextKeys.enabled,
|
|
194
194
|
f1: true,
|
|
195
195
|
category: CHAT_CATEGORY,
|
|
@@ -225,7 +225,7 @@ function registerChatCodeBlockActions() {
|
|
|
225
225
|
constructor() {
|
|
226
226
|
super({
|
|
227
227
|
id: 'workbench.action.chat.insertCodeBlock',
|
|
228
|
-
title: ( localize2(
|
|
228
|
+
title: ( localize2(4274, "Insert At Cursor")),
|
|
229
229
|
precondition: ChatContextKeys.enabled,
|
|
230
230
|
f1: true,
|
|
231
231
|
category: CHAT_CATEGORY,
|
|
@@ -259,7 +259,7 @@ function registerChatCodeBlockActions() {
|
|
|
259
259
|
constructor() {
|
|
260
260
|
super({
|
|
261
261
|
id: 'workbench.action.chat.insertIntoNewFile',
|
|
262
|
-
title: ( localize2(
|
|
262
|
+
title: ( localize2(4275, "Insert into New File")),
|
|
263
263
|
precondition: ChatContextKeys.enabled,
|
|
264
264
|
f1: true,
|
|
265
265
|
category: CHAT_CATEGORY,
|
|
@@ -300,7 +300,7 @@ function registerChatCodeBlockActions() {
|
|
|
300
300
|
constructor() {
|
|
301
301
|
super({
|
|
302
302
|
id: 'workbench.action.chat.runInTerminal',
|
|
303
|
-
title: ( localize2(
|
|
303
|
+
title: ( localize2(4276, "Insert into Terminal")),
|
|
304
304
|
precondition: ChatContextKeys.enabled,
|
|
305
305
|
f1: true,
|
|
306
306
|
category: CHAT_CATEGORY,
|
|
@@ -393,7 +393,7 @@ function registerChatCodeBlockActions() {
|
|
|
393
393
|
constructor() {
|
|
394
394
|
super({
|
|
395
395
|
id: 'workbench.action.chat.nextCodeBlock',
|
|
396
|
-
title: ( localize2(
|
|
396
|
+
title: ( localize2(4277, "Next Code Block")),
|
|
397
397
|
keybinding: {
|
|
398
398
|
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown,
|
|
399
399
|
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageDown, },
|
|
@@ -413,7 +413,7 @@ function registerChatCodeBlockActions() {
|
|
|
413
413
|
constructor() {
|
|
414
414
|
super({
|
|
415
415
|
id: 'workbench.action.chat.previousCodeBlock',
|
|
416
|
-
title: ( localize2(
|
|
416
|
+
title: ( localize2(4278, "Previous Code Block")),
|
|
417
417
|
keybinding: {
|
|
418
418
|
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageUp,
|
|
419
419
|
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.PageUp, },
|
|
@@ -470,7 +470,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
470
470
|
constructor() {
|
|
471
471
|
super({
|
|
472
472
|
id: 'workbench.action.chat.applyCompareEdits',
|
|
473
|
-
title: ( localize2(
|
|
473
|
+
title: ( localize2(4279, "Apply Edits")),
|
|
474
474
|
f1: false,
|
|
475
475
|
category: CHAT_CATEGORY,
|
|
476
476
|
icon: Codicon.gitPullRequestGoToChanges,
|
|
@@ -514,7 +514,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
514
514
|
constructor() {
|
|
515
515
|
super({
|
|
516
516
|
id: 'workbench.action.chat.discardCompareEdits',
|
|
517
|
-
title: ( localize2(
|
|
517
|
+
title: ( localize2(4280, "Discard Edits")),
|
|
518
518
|
f1: false,
|
|
519
519
|
category: CHAT_CATEGORY,
|
|
520
520
|
icon: Codicon.trash,
|
|
@@ -132,7 +132,7 @@ class AttachFileToChatAction extends AttachFileAction {
|
|
|
132
132
|
constructor() {
|
|
133
133
|
super({
|
|
134
134
|
id: AttachFileToChatAction.ID,
|
|
135
|
-
title: ( localize2(
|
|
135
|
+
title: ( localize2(4281, "Add File to Chat")),
|
|
136
136
|
category: CHAT_CATEGORY,
|
|
137
137
|
f1: false,
|
|
138
138
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
@@ -163,7 +163,7 @@ class AttachSelectionToChatAction extends Action2 {
|
|
|
163
163
|
constructor() {
|
|
164
164
|
super({
|
|
165
165
|
id: AttachSelectionToChatAction.ID,
|
|
166
|
-
title: ( localize2(
|
|
166
|
+
title: ( localize2(4282, "Add Selection to Chat")),
|
|
167
167
|
category: CHAT_CATEGORY,
|
|
168
168
|
f1: false,
|
|
169
169
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
@@ -224,7 +224,7 @@ class AttachFileToEditingSessionAction extends AttachFileAction {
|
|
|
224
224
|
constructor() {
|
|
225
225
|
super({
|
|
226
226
|
id: AttachFileToEditingSessionAction.ID,
|
|
227
|
-
title: ( localize2(
|
|
227
|
+
title: ( localize2(4283, "Add File to {0}", 'Copilot Edits')),
|
|
228
228
|
category: CHAT_CATEGORY,
|
|
229
229
|
f1: false,
|
|
230
230
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
@@ -255,7 +255,7 @@ class AttachSelectionToEditingSessionAction extends Action2 {
|
|
|
255
255
|
constructor() {
|
|
256
256
|
super({
|
|
257
257
|
id: AttachSelectionToEditingSessionAction.ID,
|
|
258
|
-
title: ( localize2(
|
|
258
|
+
title: ( localize2(4284, "Add Selection to {0}", 'Copilot Edits')),
|
|
259
259
|
category: CHAT_CATEGORY,
|
|
260
260
|
f1: false,
|
|
261
261
|
precondition: ( ContextKeyExpr.and(ChatContextKeys.enabled, ( ContextKeyExpr.or(( ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID)), TextCompareEditorActiveContext)))),
|
|
@@ -286,7 +286,7 @@ class AttachContextAction extends Action2 {
|
|
|
286
286
|
static { this._cdt = ( ContextKeyExpr.or(( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Panel)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Editor)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Notebook)))), ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.Terminal)))))); }
|
|
287
287
|
constructor(desc = {
|
|
288
288
|
id: AttachContextAction.ID,
|
|
289
|
-
title: ( localize2(
|
|
289
|
+
title: ( localize2(4285, "Attach Context")),
|
|
290
290
|
icon: Codicon.attach,
|
|
291
291
|
category: CHAT_CATEGORY,
|
|
292
292
|
precondition: ( ContextKeyExpr.or(AttachContextAction._cdt, ( ContextKeyExpr.and(( ChatContextKeys.location.isEqualTo(ChatAgentLocation.EditingSession)))))),
|
|
@@ -435,7 +435,7 @@ class AttachContextAction extends Action2 {
|
|
|
435
435
|
}
|
|
436
436
|
return acc;
|
|
437
437
|
}, []));
|
|
438
|
-
const selectedFiles = await quickInputService.pick(itemsPromise, { placeHolder: ( localize(
|
|
438
|
+
const selectedFiles = await quickInputService.pick(itemsPromise, { placeHolder: ( localize(4286, 'Add related files to your working set')), canPickMany: true });
|
|
439
439
|
for (const file of selectedFiles ?? []) {
|
|
440
440
|
chatEditingService?.currentEditingSessionObs.get()?.addFileToWorkingSet(file.value);
|
|
441
441
|
}
|
|
@@ -483,8 +483,8 @@ class AttachContextAction extends Action2 {
|
|
|
483
483
|
const fileBuffer = await clipboardService.readImage();
|
|
484
484
|
toAttach.push({
|
|
485
485
|
id: await imageToHash(fileBuffer),
|
|
486
|
-
name: ( localize(
|
|
487
|
-
fullName: ( localize(
|
|
486
|
+
name: ( localize(4287, 'Pasted Image')),
|
|
487
|
+
fullName: ( localize(4287, 'Pasted Image')),
|
|
488
488
|
value: fileBuffer,
|
|
489
489
|
isDynamic: true,
|
|
490
490
|
isImage: true
|
|
@@ -551,7 +551,7 @@ class AttachContextAction extends Action2 {
|
|
|
551
551
|
quickPickItems.push({
|
|
552
552
|
kind: 'image',
|
|
553
553
|
id: await imageToHash(imageData),
|
|
554
|
-
label: ( localize(
|
|
554
|
+
label: ( localize(4288, 'Image from Clipboard')),
|
|
555
555
|
iconClass: ThemeIcon.asClassName(Codicon.fileMedia),
|
|
556
556
|
});
|
|
557
557
|
}
|
|
@@ -561,8 +561,8 @@ class AttachContextAction extends Action2 {
|
|
|
561
561
|
icon: ThemeIcon.fromId(Codicon.deviceCamera.id),
|
|
562
562
|
iconClass: ThemeIcon.asClassName(Codicon.deviceCamera),
|
|
563
563
|
label: (isElectron
|
|
564
|
-
? ( localize(
|
|
565
|
-
: ( localize(
|
|
564
|
+
? ( localize(4289, 'Screenshot Window'))
|
|
565
|
+
: ( localize(4290, 'Screenshot'))),
|
|
566
566
|
});
|
|
567
567
|
}
|
|
568
568
|
if (widget.viewModel?.sessionId) {
|
|
@@ -605,7 +605,7 @@ class AttachContextAction extends Action2 {
|
|
|
605
605
|
}
|
|
606
606
|
quickPickItems.push({
|
|
607
607
|
kind: 'quickaccess',
|
|
608
|
-
label: ( localize(
|
|
608
|
+
label: ( localize(4291, 'Symbol...')),
|
|
609
609
|
iconClass: ThemeIcon.asClassName(Codicon.symbolField),
|
|
610
610
|
prefix: SymbolsQuickAccessProvider.PREFIX,
|
|
611
611
|
id: 'symbol'
|
|
@@ -618,10 +618,10 @@ class AttachContextAction extends Action2 {
|
|
|
618
618
|
icon: ThemeIcon.fromId(Codicon.serverEnvironment.id),
|
|
619
619
|
iconClass: ThemeIcon.asClassName(Codicon.serverEnvironment),
|
|
620
620
|
value: 'kernelVariable',
|
|
621
|
-
label: ( localize(
|
|
621
|
+
label: ( localize(4292, 'Kernel Variable...')),
|
|
622
622
|
command: {
|
|
623
623
|
id: 'notebook.chat.selectAndInsertKernelVariable',
|
|
624
|
-
title: ( localize(
|
|
624
|
+
title: ( localize(4293, 'Select and Insert Kernel Variable')),
|
|
625
625
|
arguments: [{ widget, range: undefined }]
|
|
626
626
|
}
|
|
627
627
|
});
|
|
@@ -632,7 +632,7 @@ class AttachContextAction extends Action2 {
|
|
|
632
632
|
quickPickItems.push({
|
|
633
633
|
kind: 'related-files',
|
|
634
634
|
id: 'related-files',
|
|
635
|
-
label: ( localize(
|
|
635
|
+
label: ( localize(4294, 'Related Files')),
|
|
636
636
|
iconClass: ThemeIcon.asClassName(Codicon.sparkle),
|
|
637
637
|
});
|
|
638
638
|
}
|
|
@@ -640,7 +640,7 @@ class AttachContextAction extends Action2 {
|
|
|
640
640
|
quickPickItems.push({
|
|
641
641
|
kind: 'open-editors',
|
|
642
642
|
id: 'open-editors',
|
|
643
|
-
label: ( localize(
|
|
643
|
+
label: ( localize(4295, 'Open Editors')),
|
|
644
644
|
iconClass: ThemeIcon.asClassName(Codicon.files),
|
|
645
645
|
});
|
|
646
646
|
}
|
|
@@ -648,7 +648,7 @@ class AttachContextAction extends Action2 {
|
|
|
648
648
|
quickPickItems.push({
|
|
649
649
|
kind: 'search-results',
|
|
650
650
|
id: 'search-results',
|
|
651
|
-
label: ( localize(
|
|
651
|
+
label: ( localize(4296, 'Search Results')),
|
|
652
652
|
iconClass: ThemeIcon.asClassName(Codicon.search),
|
|
653
653
|
});
|
|
654
654
|
}
|
|
@@ -657,7 +657,7 @@ class AttachContextAction extends Action2 {
|
|
|
657
657
|
quickPickItems.push({
|
|
658
658
|
kind: 'prompt-instructions',
|
|
659
659
|
id: 'prompt-instructions',
|
|
660
|
-
label: ( localize(
|
|
660
|
+
label: ( localize(4297, 'Prompt...')),
|
|
661
661
|
iconClass: ThemeIcon.asClassName(Codicon.bookmark),
|
|
662
662
|
});
|
|
663
663
|
}
|
|
@@ -733,7 +733,7 @@ class AttachContextAction extends Action2 {
|
|
|
733
733
|
SymbolsQuickAccessProvider.PREFIX,
|
|
734
734
|
AbstractGotoSymbolQuickAccessProvider.PREFIX
|
|
735
735
|
],
|
|
736
|
-
placeholder: placeholder ?? ( localize(
|
|
736
|
+
placeholder: placeholder ?? ( localize(4298, 'Search attachments')),
|
|
737
737
|
providerOptions,
|
|
738
738
|
});
|
|
739
739
|
}
|
|
@@ -742,7 +742,7 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
|
|
|
742
742
|
constructor() {
|
|
743
743
|
super({
|
|
744
744
|
id: 'workbench.action.chat.editing.attachFiles',
|
|
745
|
-
title: ( localize2(
|
|
745
|
+
title: ( localize2(4299, "Add Files to Working Set")),
|
|
746
746
|
f1: false,
|
|
747
747
|
category: CHAT_CATEGORY,
|
|
748
748
|
precondition: ( ChatContextKeys.location.isEqualTo(ChatAgentLocation.EditingSession))
|
|
@@ -750,7 +750,7 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
|
|
|
750
750
|
}
|
|
751
751
|
async run(accessor, ...args) {
|
|
752
752
|
const context = args[0];
|
|
753
|
-
const attachFilesContext = { ...context, showFilesOnly: true, placeholder: ( localize(
|
|
753
|
+
const attachFilesContext = { ...context, showFilesOnly: true, placeholder: ( localize(4300, 'Search for files to add to your working set')) };
|
|
754
754
|
return super.run(accessor, attachFilesContext);
|
|
755
755
|
}
|
|
756
756
|
});
|
|
@@ -775,13 +775,13 @@ const selectPromptAttachment = async (options) => {
|
|
|
775
775
|
if (files.length === 0) {
|
|
776
776
|
const docsQuickPick = {
|
|
777
777
|
type: 'item',
|
|
778
|
-
label: ( localize(
|
|
778
|
+
label: ( localize(4301, 'Learn how create reusable prompts')),
|
|
779
779
|
description: PromptFilesConfig.DOCUMENTATION_URL,
|
|
780
780
|
tooltip: PromptFilesConfig.DOCUMENTATION_URL,
|
|
781
781
|
value: ( URI.parse(PromptFilesConfig.DOCUMENTATION_URL)),
|
|
782
782
|
};
|
|
783
783
|
const result = await quickInputService.pick([docsQuickPick], {
|
|
784
|
-
placeHolder: ( localize(
|
|
784
|
+
placeHolder: ( localize(4302, 'No prompt files found.')),
|
|
785
785
|
canPickMany: false,
|
|
786
786
|
});
|
|
787
787
|
if (!result) {
|
|
@@ -791,7 +791,7 @@ const selectPromptAttachment = async (options) => {
|
|
|
791
791
|
return;
|
|
792
792
|
}
|
|
793
793
|
const selectedFile = await quickInputService.pick(files, {
|
|
794
|
-
placeHolder: ( localize(
|
|
794
|
+
placeHolder: ( localize(4303, 'Select a prompt file')),
|
|
795
795
|
canPickMany: false,
|
|
796
796
|
});
|
|
797
797
|
if (selectedFile) {
|
|
@@ -12,7 +12,7 @@ function registerChatCopyActions() {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
id: 'workbench.action.chat.copyAll',
|
|
15
|
-
title: ( localize2(
|
|
15
|
+
title: ( localize2(4304, "Copy All")),
|
|
16
16
|
f1: false,
|
|
17
17
|
category: CHAT_CATEGORY,
|
|
18
18
|
menu: {
|
|
@@ -42,7 +42,7 @@ function registerChatCopyActions() {
|
|
|
42
42
|
constructor() {
|
|
43
43
|
super({
|
|
44
44
|
id: 'workbench.action.chat.copyItem',
|
|
45
|
-
title: ( localize2(
|
|
45
|
+
title: ( localize2(4305, "Copy")),
|
|
46
46
|
f1: false,
|
|
47
47
|
category: CHAT_CATEGORY,
|
|
48
48
|
menu: {
|
|
@@ -13,7 +13,7 @@ class LogChatInputHistoryAction extends Action2 {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: LogChatInputHistoryAction.ID,
|
|
16
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(4306, "Log Chat Input History")),
|
|
17
17
|
icon: Codicon.attach,
|
|
18
18
|
category: Categories.Developer,
|
|
19
19
|
f1: true
|
|
@@ -13,7 +13,7 @@ function registerChatFileTreeActions() {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
super({
|
|
15
15
|
id: 'workbench.action.chat.nextFileTree',
|
|
16
|
-
title: ( localize2(
|
|
16
|
+
title: ( localize2(4328, "Next File Tree")),
|
|
17
17
|
keybinding: {
|
|
18
18
|
primary: KeyMod.CtrlCmd | KeyCode.F9,
|
|
19
19
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -32,7 +32,7 @@ function registerChatFileTreeActions() {
|
|
|
32
32
|
constructor() {
|
|
33
33
|
super({
|
|
34
34
|
id: 'workbench.action.chat.previousFileTree',
|
|
35
|
-
title: ( localize2(
|
|
35
|
+
title: ( localize2(4329, "Previous File Tree")),
|
|
36
36
|
keybinding: {
|
|
37
37
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F9,
|
|
38
38
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
@@ -14,14 +14,14 @@ import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
14
14
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
15
|
|
|
16
16
|
const defaultFileName = 'chat.json';
|
|
17
|
-
const filters = [{ name: ( localize(
|
|
17
|
+
const filters = [{ name: ( localize(4330, "Chat Session")), extensions: ['json'] }];
|
|
18
18
|
function registerChatExportActions() {
|
|
19
19
|
registerAction2(class ExportChatAction extends Action2 {
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: 'workbench.action.chat.export',
|
|
23
23
|
category: CHAT_CATEGORY,
|
|
24
|
-
title: ( localize2(
|
|
24
|
+
title: ( localize2(4331, "Export Chat...")),
|
|
25
25
|
precondition: ChatContextKeys.enabled,
|
|
26
26
|
f1: true,
|
|
27
27
|
});
|
|
@@ -55,7 +55,7 @@ function registerChatExportActions() {
|
|
|
55
55
|
constructor() {
|
|
56
56
|
super({
|
|
57
57
|
id: 'workbench.action.chat.import',
|
|
58
|
-
title: ( localize2(
|
|
58
|
+
title: ( localize2(4332, "Import Chat...")),
|
|
59
59
|
category: CHAT_CATEGORY,
|
|
60
60
|
precondition: ChatContextKeys.enabled,
|
|
61
61
|
f1: true,
|
|
@@ -26,7 +26,7 @@ function registerMoveActions() {
|
|
|
26
26
|
constructor() {
|
|
27
27
|
super({
|
|
28
28
|
id: `workbench.action.chat.openInEditor`,
|
|
29
|
-
title: ( localize2(
|
|
29
|
+
title: ( localize2(4333, "Open Chat in Editor")),
|
|
30
30
|
category: CHAT_CATEGORY,
|
|
31
31
|
precondition: ChatContextKeys.enabled,
|
|
32
32
|
f1: true,
|
|
@@ -47,7 +47,7 @@ function registerMoveActions() {
|
|
|
47
47
|
constructor() {
|
|
48
48
|
super({
|
|
49
49
|
id: `workbench.action.chat.openInNewWindow`,
|
|
50
|
-
title: ( localize2(
|
|
50
|
+
title: ( localize2(4334, "Open Chat in New Window")),
|
|
51
51
|
category: CHAT_CATEGORY,
|
|
52
52
|
precondition: ChatContextKeys.enabled,
|
|
53
53
|
f1: true,
|
|
@@ -68,7 +68,7 @@ function registerMoveActions() {
|
|
|
68
68
|
constructor() {
|
|
69
69
|
super({
|
|
70
70
|
id: `workbench.action.chat.openInSidebar`,
|
|
71
|
-
title: ( localize2(
|
|
71
|
+
title: ( localize2(4335, "Open Chat in Side Bar")),
|
|
72
72
|
category: CHAT_CATEGORY,
|
|
73
73
|
precondition: ChatContextKeys.enabled,
|
|
74
74
|
f1: true,
|
|
@@ -20,7 +20,7 @@ function registerQuickChatActions() {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: 'workbench.action.quickchat.openInChatView',
|
|
23
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(4336, "Open in Chat View")),
|
|
24
24
|
f1: false,
|
|
25
25
|
category: CHAT_CATEGORY,
|
|
26
26
|
icon: Codicon.commentDiscussion,
|
|
@@ -40,7 +40,7 @@ function registerQuickChatActions() {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: 'workbench.action.quickchat.close',
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(4337, "Close Quick Chat")),
|
|
44
44
|
f1: false,
|
|
45
45
|
category: CHAT_CATEGORY,
|
|
46
46
|
icon: Codicon.close,
|
|
@@ -60,7 +60,7 @@ function registerQuickChatActions() {
|
|
|
60
60
|
constructor() {
|
|
61
61
|
super({
|
|
62
62
|
id: 'workbench.action.quickchat.launchInlineChat',
|
|
63
|
-
title: ( localize2(
|
|
63
|
+
title: ( localize2(4338, "Launch Inline Chat")),
|
|
64
64
|
f1: false,
|
|
65
65
|
category: CHAT_CATEGORY
|
|
66
66
|
});
|
|
@@ -88,7 +88,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super({
|
|
90
90
|
id: ASK_QUICK_QUESTION_ACTION_ID,
|
|
91
|
-
title: ( localize2(
|
|
91
|
+
title: ( localize2(4339, 'Quick Chat')),
|
|
92
92
|
precondition: ChatContextKeys.enabled,
|
|
93
93
|
icon: Codicon.commentDiscussion,
|
|
94
94
|
f1: false,
|
|
@@ -103,7 +103,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
103
103
|
order: 5
|
|
104
104
|
},
|
|
105
105
|
metadata: {
|
|
106
|
-
description: ( localize(
|
|
106
|
+
description: ( localize(4340, 'Toggle the quick chat')),
|
|
107
107
|
args: [{
|
|
108
108
|
name: 'args',
|
|
109
109
|
schema: {
|
|
@@ -113,18 +113,18 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
113
113
|
required: ['query'],
|
|
114
114
|
properties: {
|
|
115
115
|
query: {
|
|
116
|
-
description: ( localize(
|
|
116
|
+
description: ( localize(4341, "The query to open the quick chat with")),
|
|
117
117
|
type: 'string'
|
|
118
118
|
},
|
|
119
119
|
isPartialQuery: {
|
|
120
|
-
description: ( localize(
|
|
120
|
+
description: ( localize(4342, "Whether the query is partial; it will wait for more user input")),
|
|
121
121
|
type: 'boolean'
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
type: 'string',
|
|
127
|
-
description: ( localize(
|
|
127
|
+
description: ( localize(4341, "The query to open the quick chat with"))
|
|
128
128
|
}
|
|
129
129
|
]
|
|
130
130
|
}
|
|
@@ -154,7 +154,7 @@ class AskQuickChatAction extends Action2 {
|
|
|
154
154
|
super({
|
|
155
155
|
id: `workbench.action.openQuickChat`,
|
|
156
156
|
category: CHAT_CATEGORY,
|
|
157
|
-
title: ( localize2(
|
|
157
|
+
title: ( localize2(4343, "Open Quick Chat")),
|
|
158
158
|
f1: true
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -52,7 +52,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
52
52
|
}
|
|
53
53
|
else {
|
|
54
54
|
this.notify(( localize(
|
|
55
|
-
|
|
55
|
+
4360,
|
|
56
56
|
"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."
|
|
57
57
|
)));
|
|
58
58
|
}
|
|
@@ -65,7 +65,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
65
65
|
}
|
|
66
66
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
67
67
|
if (notebookEditor.isReadOnly) {
|
|
68
|
-
this.notify(( localize(
|
|
68
|
+
this.notify(( localize(4361, "Cannot insert the code block to read-only notebook editor.")));
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
71
71
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -76,7 +76,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
76
76
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
77
77
|
const activeModel = codeEditor.getModel();
|
|
78
78
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
79
|
-
this.notify(( localize(
|
|
79
|
+
this.notify(( localize(4362, "Cannot insert the code block to read-only code editor.")));
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
82
|
const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
|
|
@@ -128,7 +128,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
128
128
|
activeEditorControl = codeEditor;
|
|
129
129
|
}
|
|
130
130
|
else {
|
|
131
|
-
this.notify(( localize(
|
|
131
|
+
this.notify(( localize(4363, "Failed to open {0} in a code editor.", (codemapperUri.toString()))));
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
@@ -147,7 +147,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
147
147
|
result = await this.handleNotebookEditor(activeNotebookEditor, context.code);
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
|
-
this.notify(( localize(
|
|
150
|
+
this.notify(( localize(4364, "To apply this code block, open a code or notebook editor.")));
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
notifyUserAction(this.chatService, context, {
|
|
@@ -163,15 +163,15 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
163
163
|
return resource;
|
|
164
164
|
}
|
|
165
165
|
const activeEditorOption = activeEditorControl?.getModel().uri ? { label: ( localize(
|
|
166
|
-
|
|
166
|
+
4365,
|
|
167
167
|
"Active editor '{0}'",
|
|
168
168
|
this.labelService.getUriLabel(activeEditorControl.getModel().uri, { relative: true })
|
|
169
169
|
)), id: 'activeEditor' } : undefined;
|
|
170
|
-
const untitledEditorOption = { label: ( localize(
|
|
170
|
+
const untitledEditorOption = { label: ( localize(4366, "New untitled editor")), id: 'newUntitledFile' };
|
|
171
171
|
const options = [];
|
|
172
172
|
if (resource) {
|
|
173
173
|
options.push({ label: ( localize(
|
|
174
|
-
|
|
174
|
+
4367,
|
|
175
175
|
"New file '{0}'",
|
|
176
176
|
this.labelService.getUriLabel(resource, { relative: true })
|
|
177
177
|
)), id: 'createFile' });
|
|
@@ -186,7 +186,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
186
186
|
}
|
|
187
187
|
options.push(untitledEditorOption);
|
|
188
188
|
}
|
|
189
|
-
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(
|
|
189
|
+
const selected = options.length > 1 ? await this.quickInputService.pick(options, { placeHolder: ( localize(4368, "Select where to apply the code block")) }) : options[0];
|
|
190
190
|
if (selected) {
|
|
191
191
|
switch (selected.id) {
|
|
192
192
|
case 'createFile':
|
|
@@ -195,7 +195,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
195
195
|
await this.fileService.writeFile(resource, VSBuffer.fromString(''));
|
|
196
196
|
}
|
|
197
197
|
catch (error) {
|
|
198
|
-
this.notify(( localize(
|
|
198
|
+
this.notify(( localize(4369, "Failed to create file: {0}", error.message)));
|
|
199
199
|
return ( URI.from({ scheme: 'untitled', path: resource.path }));
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -210,7 +210,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
210
210
|
}
|
|
211
211
|
async handleNotebookEditor(notebookEditor, code) {
|
|
212
212
|
if (notebookEditor.isReadOnly) {
|
|
213
|
-
this.notify(( localize(
|
|
213
|
+
this.notify(( localize(4370, "Cannot apply code block to read-only notebook editor.")));
|
|
214
214
|
return undefined;
|
|
215
215
|
}
|
|
216
216
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -221,20 +221,20 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
221
221
|
async handleTextEditor(codeEditor, code) {
|
|
222
222
|
const activeModel = codeEditor.getModel();
|
|
223
223
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
224
|
-
this.notify(( localize(
|
|
224
|
+
this.notify(( localize(4371, "Cannot apply code block to read-only file.")));
|
|
225
225
|
return undefined;
|
|
226
226
|
}
|
|
227
227
|
const codeBlock = { code, resource: activeModel.uri, markdownBeforeBlock: undefined };
|
|
228
228
|
const codeMapper = this.codeMapperService.providers[0]?.displayName;
|
|
229
229
|
if (!codeMapper) {
|
|
230
|
-
this.notify(( localize(
|
|
230
|
+
this.notify(( localize(4372, "No code mapper available.")));
|
|
231
231
|
return undefined;
|
|
232
232
|
}
|
|
233
233
|
let editsProposed = false;
|
|
234
234
|
const cancellationTokenSource = ( new CancellationTokenSource());
|
|
235
235
|
try {
|
|
236
236
|
const iterable = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
237
|
-
progress.report({ message: ( localize(
|
|
237
|
+
progress.report({ message: ( localize(4373, "Applying code block using {0}...", codeMapper)) });
|
|
238
238
|
const editsIterable = this.getEdits(codeBlock, cancellationTokenSource.token);
|
|
239
239
|
return await this.waitForFirstElement(editsIterable);
|
|
240
240
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -242,7 +242,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
242
242
|
}
|
|
243
243
|
catch (e) {
|
|
244
244
|
if (!isCancellationError(e)) {
|
|
245
|
-
this.notify(( localize(
|
|
245
|
+
this.notify(( localize(4374, "Failed to apply code block: {0}", e.message)));
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
finally {
|