@codingame/monaco-vscode-chat-service-override 10.1.1 → 10.1.2
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 +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +19 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +10 -10
- 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 +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.contribution.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/chatGettingStarted.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelToolsService.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/common/languageModels.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +14 -14
- 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/inlineChatCurrentLine.js +2 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-chat-service-override",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.2",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@10.1.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.1.2"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -27,93 +27,93 @@ function getAccessibilityHelpText(type) {
|
|
|
27
27
|
const content = [];
|
|
28
28
|
if (type === 'panelChat') {
|
|
29
29
|
content.push(( localize(
|
|
30
|
-
|
|
30
|
+
7241,
|
|
31
31
|
'The chat view is comprised of an input box and a request/response list. The input box is used to make requests and the list is used to display responses.'
|
|
32
32
|
)));
|
|
33
33
|
content.push(( localize(
|
|
34
|
-
|
|
34
|
+
7242,
|
|
35
35
|
'In the input box, use up and down arrows to navigate your request history. Edit input and use enter or the submit button to run a new request.'
|
|
36
36
|
)));
|
|
37
37
|
content.push(( localize(
|
|
38
|
-
|
|
38
|
+
7243,
|
|
39
39
|
'In the input box, inspect the last response in the accessible view{0}.',
|
|
40
40
|
'<keybinding:editor.action.accessibleView>'
|
|
41
41
|
)));
|
|
42
42
|
content.push(( localize(
|
|
43
|
-
|
|
43
|
+
7244,
|
|
44
44
|
'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
|
|
45
45
|
)));
|
|
46
46
|
content.push(( localize(
|
|
47
|
-
|
|
47
|
+
7245,
|
|
48
48
|
'Chat responses will be announced as they come in. A response will indicate the number of code blocks, if any, and then the rest of the response.'
|
|
49
49
|
)));
|
|
50
50
|
content.push(( localize(
|
|
51
|
-
|
|
51
|
+
7246,
|
|
52
52
|
'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
|
|
53
53
|
'<keybinding:chat.action.focus>'
|
|
54
54
|
)));
|
|
55
55
|
content.push(( localize(
|
|
56
|
-
|
|
56
|
+
7247,
|
|
57
57
|
'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
|
|
58
58
|
'<keybinding:workbench.action.chat.focusInput>'
|
|
59
59
|
)));
|
|
60
60
|
content.push(( localize(
|
|
61
|
-
|
|
61
|
+
7248,
|
|
62
62
|
'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
|
|
63
63
|
'<keybinding:workbench.action.chat.nextCodeBlock>'
|
|
64
64
|
)));
|
|
65
65
|
content.push(( localize(
|
|
66
|
-
|
|
66
|
+
7249,
|
|
67
67
|
'To focus the next file tree within a response, invoke the Chat: Next File Tree command{0}.',
|
|
68
68
|
'<keybinding:workbench.action.chat.nextFileTree>'
|
|
69
69
|
)));
|
|
70
70
|
content.push(( localize(
|
|
71
|
-
|
|
71
|
+
7250,
|
|
72
72
|
'To create a new chat session, invoke the New Chat command{0}.',
|
|
73
73
|
'<keybinding:workbench.action.chat.new>'
|
|
74
74
|
)));
|
|
75
75
|
}
|
|
76
76
|
else {
|
|
77
77
|
content.push(( localize(
|
|
78
|
-
|
|
78
|
+
7251,
|
|
79
79
|
"Inline chat occurs within a code editor and takes into account the current selection. It is useful for making changes to the current editor. For example, fixing diagnostics, documenting or refactoring code. Keep in mind that AI generated code may be incorrect."
|
|
80
80
|
)));
|
|
81
81
|
content.push(( localize(
|
|
82
|
-
|
|
82
|
+
7252,
|
|
83
83
|
"It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
|
|
84
84
|
'<keybinding:inlineChat.start>'
|
|
85
85
|
)));
|
|
86
86
|
content.push(( localize(
|
|
87
|
-
|
|
87
|
+
7253,
|
|
88
88
|
'In the input box, use Show Previous{0} and Show Next{1} to navigate your request history. Edit input and use enter or the submit button to run a new request.',
|
|
89
89
|
'<keybinding:history.showPrevious>',
|
|
90
90
|
'<keybinding:history.showNext>'
|
|
91
91
|
)));
|
|
92
92
|
content.push(( localize(
|
|
93
|
-
|
|
93
|
+
7254,
|
|
94
94
|
'In the input box, inspect the response in the accessible view{0}.',
|
|
95
95
|
'<keybinding:editor.action.accessibleView>'
|
|
96
96
|
)));
|
|
97
97
|
content.push(( localize(
|
|
98
|
-
|
|
98
|
+
7255,
|
|
99
99
|
"Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
|
|
100
100
|
)));
|
|
101
101
|
content.push(( localize(
|
|
102
|
-
|
|
102
|
+
7256,
|
|
103
103
|
"If a fix action is invoked, a response will indicate the problem with the current code. A diff editor will be rendered and can be reached by tabbing."
|
|
104
104
|
)));
|
|
105
105
|
content.push(( localize(
|
|
106
|
-
|
|
106
|
+
7257,
|
|
107
107
|
"Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
|
|
108
108
|
AccessibleDiffViewerNext.id
|
|
109
109
|
)));
|
|
110
110
|
content.push(( localize(
|
|
111
|
-
|
|
111
|
+
7258,
|
|
112
112
|
"Use tab to reach conditional parts like commands, status, message responses and more."
|
|
113
113
|
)));
|
|
114
114
|
}
|
|
115
115
|
content.push(( localize(
|
|
116
|
-
|
|
116
|
+
7259,
|
|
117
117
|
"Accessibility Signals can be changed via settings with a prefix of signals.chat. By default, if a request takes more than 4 seconds, you will hear a sound indicating that progress is still occurring."
|
|
118
118
|
)));
|
|
119
119
|
return content.join('\n');
|
|
@@ -20,7 +20,7 @@ function registerNewChatActions() {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: 'workbench.action.chatEditor.newChat',
|
|
23
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(7276, "New Chat")),
|
|
24
24
|
icon: Codicon.plus,
|
|
25
25
|
f1: false,
|
|
26
26
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -41,7 +41,7 @@ function registerNewChatActions() {
|
|
|
41
41
|
constructor() {
|
|
42
42
|
super({
|
|
43
43
|
id: ACTION_ID_NEW_CHAT,
|
|
44
|
-
title: ( localize2(
|
|
44
|
+
title: ( localize2(7276, "New Chat")),
|
|
45
45
|
category: CHAT_CATEGORY,
|
|
46
46
|
icon: Codicon.plus,
|
|
47
47
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -64,7 +64,7 @@ function registerChatCodeBlockActions() {
|
|
|
64
64
|
constructor() {
|
|
65
65
|
super({
|
|
66
66
|
id: 'workbench.action.chat.copyCodeBlock',
|
|
67
|
-
title: ( localize2(
|
|
67
|
+
title: ( localize2(7277, "Copy")),
|
|
68
68
|
f1: false,
|
|
69
69
|
category: CHAT_CATEGORY,
|
|
70
70
|
icon: Codicon.copy,
|
|
@@ -149,7 +149,7 @@ function registerChatCodeBlockActions() {
|
|
|
149
149
|
constructor() {
|
|
150
150
|
super({
|
|
151
151
|
id: 'workbench.action.chat.applyInEditor',
|
|
152
|
-
title: ( localize2(
|
|
152
|
+
title: ( localize2(7278, "Apply in Editor")),
|
|
153
153
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
154
154
|
f1: true,
|
|
155
155
|
category: CHAT_CATEGORY,
|
|
@@ -184,7 +184,7 @@ function registerChatCodeBlockActions() {
|
|
|
184
184
|
constructor() {
|
|
185
185
|
super({
|
|
186
186
|
id: 'workbench.action.chat.applyAll',
|
|
187
|
-
title: ( localize2(
|
|
187
|
+
title: ( localize2(7279, "Apply All Edits")),
|
|
188
188
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
189
189
|
f1: true,
|
|
190
190
|
category: CHAT_CATEGORY,
|
|
@@ -227,7 +227,7 @@ function registerChatCodeBlockActions() {
|
|
|
227
227
|
constructor() {
|
|
228
228
|
super({
|
|
229
229
|
id: 'workbench.action.chat.insertCodeBlock',
|
|
230
|
-
title: ( localize2(
|
|
230
|
+
title: ( localize2(7280, "Insert At Cursor")),
|
|
231
231
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
232
232
|
f1: true,
|
|
233
233
|
category: CHAT_CATEGORY,
|
|
@@ -258,7 +258,7 @@ function registerChatCodeBlockActions() {
|
|
|
258
258
|
constructor() {
|
|
259
259
|
super({
|
|
260
260
|
id: 'workbench.action.chat.insertIntoNewFile',
|
|
261
|
-
title: ( localize2(
|
|
261
|
+
title: ( localize2(7281, "Insert into New File")),
|
|
262
262
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
263
263
|
f1: true,
|
|
264
264
|
category: CHAT_CATEGORY,
|
|
@@ -299,7 +299,7 @@ function registerChatCodeBlockActions() {
|
|
|
299
299
|
constructor() {
|
|
300
300
|
super({
|
|
301
301
|
id: 'workbench.action.chat.runInTerminal',
|
|
302
|
-
title: ( localize2(
|
|
302
|
+
title: ( localize2(7282, "Insert into Terminal")),
|
|
303
303
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
304
304
|
f1: true,
|
|
305
305
|
category: CHAT_CATEGORY,
|
|
@@ -399,7 +399,7 @@ function registerChatCodeBlockActions() {
|
|
|
399
399
|
constructor() {
|
|
400
400
|
super({
|
|
401
401
|
id: 'workbench.action.chat.nextCodeBlock',
|
|
402
|
-
title: ( localize2(
|
|
402
|
+
title: ( localize2(7283, "Next Code Block")),
|
|
403
403
|
keybinding: {
|
|
404
404
|
primary: 2048 | 512 | 12 ,
|
|
405
405
|
mac: { primary: 2048 | 512 | 12 , },
|
|
@@ -419,7 +419,7 @@ function registerChatCodeBlockActions() {
|
|
|
419
419
|
constructor() {
|
|
420
420
|
super({
|
|
421
421
|
id: 'workbench.action.chat.previousCodeBlock',
|
|
422
|
-
title: ( localize2(
|
|
422
|
+
title: ( localize2(7284, "Previous Code Block")),
|
|
423
423
|
keybinding: {
|
|
424
424
|
primary: 2048 | 512 | 11 ,
|
|
425
425
|
mac: { primary: 2048 | 512 | 11 , },
|
|
@@ -476,7 +476,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
476
476
|
constructor() {
|
|
477
477
|
super({
|
|
478
478
|
id: 'workbench.action.chat.applyCompareEdits',
|
|
479
|
-
title: ( localize2(
|
|
479
|
+
title: ( localize2(7285, "Apply Edits")),
|
|
480
480
|
f1: false,
|
|
481
481
|
category: CHAT_CATEGORY,
|
|
482
482
|
icon: Codicon.check,
|
|
@@ -506,7 +506,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
506
506
|
constructor() {
|
|
507
507
|
super({
|
|
508
508
|
id: 'workbench.action.chat.discardCompareEdits',
|
|
509
|
-
title: ( localize2(
|
|
509
|
+
title: ( localize2(7286, "Discard Edits")),
|
|
510
510
|
f1: false,
|
|
511
511
|
category: CHAT_CATEGORY,
|
|
512
512
|
icon: Codicon.trash,
|
|
@@ -42,7 +42,7 @@ class AttachFileAction extends Action2 {
|
|
|
42
42
|
constructor() {
|
|
43
43
|
super({
|
|
44
44
|
id: AttachFileAction.ID,
|
|
45
|
-
title: ( localize2(
|
|
45
|
+
title: ( localize2(7287, "Add File to Chat")),
|
|
46
46
|
category: CHAT_CATEGORY,
|
|
47
47
|
f1: false,
|
|
48
48
|
precondition: ( (ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor'))),
|
|
@@ -68,7 +68,7 @@ class AttachSelectionAction extends Action2 {
|
|
|
68
68
|
constructor() {
|
|
69
69
|
super({
|
|
70
70
|
id: AttachSelectionAction.ID,
|
|
71
|
-
title: ( localize2(
|
|
71
|
+
title: ( localize2(7288, "Add Selection to Chat")),
|
|
72
72
|
category: CHAT_CATEGORY,
|
|
73
73
|
f1: false,
|
|
74
74
|
precondition: ( (ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor'))),
|
|
@@ -113,7 +113,7 @@ class AttachContextAction extends Action2 {
|
|
|
113
113
|
constructor() {
|
|
114
114
|
super({
|
|
115
115
|
id: AttachContextAction.ID,
|
|
116
|
-
title: ( localize2(
|
|
116
|
+
title: ( localize2(7289, "Attach Context")),
|
|
117
117
|
icon: Codicon.attach,
|
|
118
118
|
category: CHAT_CATEGORY,
|
|
119
119
|
precondition: AttachContextAction._cdt,
|
|
@@ -227,8 +227,8 @@ class AttachContextAction extends Action2 {
|
|
|
227
227
|
const fileBuffer = await clipboardService.readImage();
|
|
228
228
|
toAttach.push({
|
|
229
229
|
id: await imageToHash(fileBuffer),
|
|
230
|
-
name: ( localize(
|
|
231
|
-
fullName: ( localize(
|
|
230
|
+
name: ( localize(7290, 'Pasted Image')),
|
|
231
|
+
fullName: ( localize(7290, 'Pasted Image')),
|
|
232
232
|
value: fileBuffer,
|
|
233
233
|
isDynamic: true,
|
|
234
234
|
isImage: true
|
|
@@ -283,7 +283,7 @@ class AttachContextAction extends Action2 {
|
|
|
283
283
|
quickPickItems.push({
|
|
284
284
|
id: await imageToHash(imageData),
|
|
285
285
|
kind: 'image',
|
|
286
|
-
label: ( localize(
|
|
286
|
+
label: ( localize(7291, 'Image from Clipboard')),
|
|
287
287
|
iconClass: ThemeIcon.asClassName(Codicon.fileMedia),
|
|
288
288
|
});
|
|
289
289
|
}
|
|
@@ -328,7 +328,7 @@ class AttachContextAction extends Action2 {
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
quickPickItems.push({
|
|
331
|
-
label: ( localize(
|
|
331
|
+
label: ( localize(7292, 'Symbol...')),
|
|
332
332
|
icon: ThemeIcon.fromId(Codicon.symbolField.id),
|
|
333
333
|
iconClass: ThemeIcon.asClassName(Codicon.symbolField),
|
|
334
334
|
prefix: SymbolsQuickAccessProvider.PREFIX
|
|
@@ -341,10 +341,10 @@ class AttachContextAction extends Action2 {
|
|
|
341
341
|
icon: ThemeIcon.fromId(Codicon.serverEnvironment.id),
|
|
342
342
|
iconClass: ThemeIcon.asClassName(Codicon.serverEnvironment),
|
|
343
343
|
value: 'kernelVariable',
|
|
344
|
-
label: ( localize(
|
|
344
|
+
label: ( localize(7293, 'Kernel Variable...')),
|
|
345
345
|
command: {
|
|
346
346
|
id: 'notebook.chat.selectAndInsertKernelVariable',
|
|
347
|
-
title: ( localize(
|
|
347
|
+
title: ( localize(7294, 'Select and Insert Kernel Variable')),
|
|
348
348
|
arguments: [{ widget, range: undefined }]
|
|
349
349
|
}
|
|
350
350
|
});
|
|
@@ -369,7 +369,7 @@ class AttachContextAction extends Action2 {
|
|
|
369
369
|
SymbolsQuickAccessProvider.PREFIX,
|
|
370
370
|
AbstractGotoSymbolQuickAccessProvider.PREFIX
|
|
371
371
|
],
|
|
372
|
-
placeholder: ( localize(
|
|
372
|
+
placeholder: ( localize(7295, 'Search attachments')),
|
|
373
373
|
providerOptions: {
|
|
374
374
|
handleAccept: (item) => {
|
|
375
375
|
if ('prefix' in item) {
|
|
@@ -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(7296, "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(7297, "Copy")),
|
|
46
46
|
f1: false,
|
|
47
47
|
category: CHAT_CATEGORY,
|
|
48
48
|
menu: {
|
|
@@ -12,7 +12,7 @@ class LogChatInputHistoryAction extends Action2 {
|
|
|
12
12
|
constructor() {
|
|
13
13
|
super({
|
|
14
14
|
id: LogChatInputHistoryAction.ID,
|
|
15
|
-
title: ( localize2(
|
|
15
|
+
title: ( localize2(7298, "Log Chat Input History")),
|
|
16
16
|
icon: Codicon.attach,
|
|
17
17
|
category: Categories.Developer,
|
|
18
18
|
f1: true
|
|
@@ -11,7 +11,7 @@ function registerChatFileTreeActions() {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: 'workbench.action.chat.nextFileTree',
|
|
14
|
-
title: ( localize2(
|
|
14
|
+
title: ( localize2(7304, "Next File Tree")),
|
|
15
15
|
keybinding: {
|
|
16
16
|
primary: 2048 | 67 ,
|
|
17
17
|
weight: 200 ,
|
|
@@ -30,7 +30,7 @@ function registerChatFileTreeActions() {
|
|
|
30
30
|
constructor() {
|
|
31
31
|
super({
|
|
32
32
|
id: 'workbench.action.chat.previousFileTree',
|
|
33
|
-
title: ( localize2(
|
|
33
|
+
title: ( localize2(7305, "Previous File Tree")),
|
|
34
34
|
keybinding: {
|
|
35
35
|
primary: 2048 | 1024 | 67 ,
|
|
36
36
|
weight: 200 ,
|
|
@@ -14,14 +14,14 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
14
14
|
import { CHAT_CATEGORY } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatConstants';
|
|
15
15
|
|
|
16
16
|
const defaultFileName = 'chat.json';
|
|
17
|
-
const filters = [{ name: ( localize(
|
|
17
|
+
const filters = [{ name: ( localize(7306, "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(7307, "Export Chat...")),
|
|
25
25
|
precondition: CONTEXT_CHAT_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(7308, "Import Chat...")),
|
|
59
59
|
category: CHAT_CATEGORY,
|
|
60
60
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
61
61
|
f1: true,
|
|
@@ -24,7 +24,7 @@ function registerMoveActions() {
|
|
|
24
24
|
constructor() {
|
|
25
25
|
super({
|
|
26
26
|
id: `workbench.action.chat.openInEditor`,
|
|
27
|
-
title: ( localize2(
|
|
27
|
+
title: ( localize2(7309, "Open Chat in Editor")),
|
|
28
28
|
category: CHAT_CATEGORY,
|
|
29
29
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
30
30
|
f1: true,
|
|
@@ -44,7 +44,7 @@ function registerMoveActions() {
|
|
|
44
44
|
constructor() {
|
|
45
45
|
super({
|
|
46
46
|
id: `workbench.action.chat.openInNewWindow`,
|
|
47
|
-
title: ( localize2(
|
|
47
|
+
title: ( localize2(7310, "Open Chat in New Window")),
|
|
48
48
|
category: CHAT_CATEGORY,
|
|
49
49
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
50
50
|
f1: true,
|
|
@@ -64,7 +64,7 @@ function registerMoveActions() {
|
|
|
64
64
|
constructor() {
|
|
65
65
|
super({
|
|
66
66
|
id: `workbench.action.chat.openInSidebar`,
|
|
67
|
-
title: ( localize2(
|
|
67
|
+
title: ( localize2(7311, "Open Chat in Side Bar")),
|
|
68
68
|
category: CHAT_CATEGORY,
|
|
69
69
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
70
70
|
f1: true,
|
|
@@ -17,7 +17,7 @@ function registerQuickChatActions() {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super({
|
|
19
19
|
id: 'workbench.action.quickchat.openInChatView',
|
|
20
|
-
title: ( localize2(
|
|
20
|
+
title: ( localize2(7312, "Open in Chat View")),
|
|
21
21
|
f1: false,
|
|
22
22
|
category: CHAT_CATEGORY,
|
|
23
23
|
icon: Codicon.commentDiscussion,
|
|
@@ -37,7 +37,7 @@ function registerQuickChatActions() {
|
|
|
37
37
|
constructor() {
|
|
38
38
|
super({
|
|
39
39
|
id: 'workbench.action.quickchat.close',
|
|
40
|
-
title: ( localize2(
|
|
40
|
+
title: ( localize2(7313, "Close Quick Chat")),
|
|
41
41
|
f1: false,
|
|
42
42
|
category: CHAT_CATEGORY,
|
|
43
43
|
icon: Codicon.close,
|
|
@@ -57,7 +57,7 @@ function registerQuickChatActions() {
|
|
|
57
57
|
constructor() {
|
|
58
58
|
super({
|
|
59
59
|
id: 'workbench.action.quickchat.launchInlineChat',
|
|
60
|
-
title: ( localize2(
|
|
60
|
+
title: ( localize2(7314, "Launch Inline Chat")),
|
|
61
61
|
f1: false,
|
|
62
62
|
category: CHAT_CATEGORY
|
|
63
63
|
});
|
|
@@ -85,7 +85,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
85
85
|
constructor() {
|
|
86
86
|
super({
|
|
87
87
|
id: ASK_QUICK_QUESTION_ACTION_ID,
|
|
88
|
-
title: ( localize2(
|
|
88
|
+
title: ( localize2(7315, 'Quick Chat')),
|
|
89
89
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
90
90
|
icon: Codicon.commentDiscussion,
|
|
91
91
|
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(7316, '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(7317, "The query to open the quick chat with")),
|
|
117
117
|
type: 'string'
|
|
118
118
|
},
|
|
119
119
|
isPartialQuery: {
|
|
120
|
-
description: ( localize(
|
|
120
|
+
description: ( localize(7318, "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(7317, "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(7319, "Open Quick Chat")),
|
|
158
158
|
f1: true
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -50,7 +50,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
52
|
this.notify(( localize(
|
|
53
|
-
|
|
53
|
+
10728,
|
|
54
54
|
"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."
|
|
55
55
|
)));
|
|
56
56
|
}
|
|
@@ -63,7 +63,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
63
63
|
}
|
|
64
64
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
65
65
|
if (notebookEditor.isReadOnly) {
|
|
66
|
-
this.notify(( localize(
|
|
66
|
+
this.notify(( localize(10729, "Cannot insert the code block to read-only notebook editor.")));
|
|
67
67
|
return false;
|
|
68
68
|
}
|
|
69
69
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -74,7 +74,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
74
74
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
75
75
|
const activeModel = codeEditor.getModel();
|
|
76
76
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
77
|
-
this.notify(( localize(
|
|
77
|
+
this.notify(( localize(10730, "Cannot insert the code block to read-only code editor.")));
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
const range = codeEditor.getSelection() ?? ( (new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1)));
|
|
@@ -114,7 +114,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
114
114
|
async run(context) {
|
|
115
115
|
if (this.inlineChatPreview && this.inlineChatPreview.isOpen()) {
|
|
116
116
|
await this.dialogService.info(( localize(
|
|
117
|
-
|
|
117
|
+
10731,
|
|
118
118
|
"Another code change is being previewed. Please apply or discard the pending changes first."
|
|
119
119
|
)));
|
|
120
120
|
return;
|
|
@@ -145,7 +145,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
145
145
|
result = await this.handleNotebookEditor(activeNotebookEditor, context);
|
|
146
146
|
}
|
|
147
147
|
else {
|
|
148
|
-
this.notify(( localize(
|
|
148
|
+
this.notify(( localize(10732, "To apply this code block, open a code or notebook editor.")));
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
notifyUserAction(this.chatService, context, {
|
|
@@ -158,7 +158,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
158
158
|
}
|
|
159
159
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
160
160
|
if (notebookEditor.isReadOnly) {
|
|
161
|
-
this.notify(( localize(
|
|
161
|
+
this.notify(( localize(10733, "Cannot apply code block to read-only notebook editor.")));
|
|
162
162
|
return undefined;
|
|
163
163
|
}
|
|
164
164
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -168,7 +168,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
168
168
|
}
|
|
169
169
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
170
170
|
if (isReadOnly(codeEditor.getModel(), this.textFileService)) {
|
|
171
|
-
this.notify(( localize(
|
|
171
|
+
this.notify(( localize(10734, "Cannot apply code block to read-only file.")));
|
|
172
172
|
return undefined;
|
|
173
173
|
}
|
|
174
174
|
const result = await this.computeEdits(codeEditor, codeBlockContext);
|
|
@@ -195,7 +195,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
195
195
|
const result = await this.progressService.withProgress({ location: 15 , delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
196
196
|
for (const provider of mappedEditsProviders) {
|
|
197
197
|
codeMapper = provider.displayName;
|
|
198
|
-
progress.report({ message: ( localize(
|
|
198
|
+
progress.report({ message: ( localize(10735, "Applying code block using {0}...", codeMapper)) });
|
|
199
199
|
const mappedEdits = await provider.provideMappedEdits(activeModel, [codeBlockActionContext.code], {
|
|
200
200
|
documents: docRefs,
|
|
201
201
|
conversation: getChatConversation(codeBlockActionContext),
|
|
@@ -212,7 +212,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
212
212
|
}
|
|
213
213
|
catch (e) {
|
|
214
214
|
if (!isCancellationError(e)) {
|
|
215
|
-
this.notify(( localize(
|
|
215
|
+
this.notify(( localize(10736, "Failed to apply code block: {0}", e.message)));
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
finally {
|
|
@@ -63,34 +63,34 @@ import './contrib/chatInputEditorHover.js';
|
|
|
63
63
|
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
64
64
|
configurationRegistry.registerConfiguration({
|
|
65
65
|
id: 'chatSidebar',
|
|
66
|
-
title: ( localize(
|
|
66
|
+
title: ( localize(3130, "Chat")),
|
|
67
67
|
type: 'object',
|
|
68
68
|
properties: {
|
|
69
69
|
'chat.editor.fontSize': {
|
|
70
70
|
type: 'number',
|
|
71
|
-
description: ( localize(
|
|
71
|
+
description: ( localize(3131, "Controls the font size in pixels in chat codeblocks.")),
|
|
72
72
|
default: isMacintosh ? 12 : 14,
|
|
73
73
|
},
|
|
74
74
|
'chat.editor.fontFamily': {
|
|
75
75
|
type: 'string',
|
|
76
|
-
description: ( localize(
|
|
76
|
+
description: ( localize(3132, "Controls the font family in chat codeblocks.")),
|
|
77
77
|
default: 'default'
|
|
78
78
|
},
|
|
79
79
|
'chat.editor.fontWeight': {
|
|
80
80
|
type: 'string',
|
|
81
|
-
description: ( localize(
|
|
81
|
+
description: ( localize(3133, "Controls the font weight in chat codeblocks.")),
|
|
82
82
|
default: 'default'
|
|
83
83
|
},
|
|
84
84
|
'chat.editor.wordWrap': {
|
|
85
85
|
type: 'string',
|
|
86
|
-
description: ( localize(
|
|
86
|
+
description: ( localize(3134, "Controls whether lines should wrap in chat codeblocks.")),
|
|
87
87
|
default: 'off',
|
|
88
88
|
enum: ['on', 'off']
|
|
89
89
|
},
|
|
90
90
|
'chat.editor.lineHeight': {
|
|
91
91
|
type: 'number',
|
|
92
92
|
description: ( localize(
|
|
93
|
-
|
|
93
|
+
3135,
|
|
94
94
|
"Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."
|
|
95
95
|
)),
|
|
96
96
|
default: 0
|
|
@@ -99,7 +99,7 @@ configurationRegistry.registerConfiguration({
|
|
|
99
99
|
type: 'boolean',
|
|
100
100
|
tags: ['experimental'],
|
|
101
101
|
markdownDescription: ( localize(
|
|
102
|
-
|
|
102
|
+
3136,
|
|
103
103
|
"Controls whether the command center shows a menu for chat actions (requires {0}).",
|
|
104
104
|
'`#window.commandCenter#`'
|
|
105
105
|
)),
|
|
@@ -108,7 +108,7 @@ configurationRegistry.registerConfiguration({
|
|
|
108
108
|
'chat.experimental.implicitContext': {
|
|
109
109
|
type: 'boolean',
|
|
110
110
|
description: ( localize(
|
|
111
|
-
|
|
111
|
+
3137,
|
|
112
112
|
"Controls whether a checkbox is shown to allow the user to determine which implicit context is included with a chat participant's prompt."
|
|
113
113
|
)),
|
|
114
114
|
deprecated: true,
|
|
@@ -116,27 +116,27 @@ configurationRegistry.registerConfiguration({
|
|
|
116
116
|
},
|
|
117
117
|
'chat.experimental.variables.editor': {
|
|
118
118
|
type: 'boolean',
|
|
119
|
-
description: ( localize(
|
|
119
|
+
description: ( localize(3138, "Enables variables for editor chat.")),
|
|
120
120
|
default: true
|
|
121
121
|
},
|
|
122
122
|
'chat.experimental.variables.notebook': {
|
|
123
123
|
type: 'boolean',
|
|
124
|
-
description: ( localize(
|
|
124
|
+
description: ( localize(3139, "Enables variables for notebook chat.")),
|
|
125
125
|
default: true
|
|
126
126
|
},
|
|
127
127
|
'chat.experimental.variables.terminal': {
|
|
128
128
|
type: 'boolean',
|
|
129
|
-
description: ( localize(
|
|
129
|
+
description: ( localize(3140, "Enables variables for terminal chat.")),
|
|
130
130
|
default: false
|
|
131
131
|
},
|
|
132
132
|
'chat.experimental.detectParticipant.enabled': {
|
|
133
133
|
type: 'boolean',
|
|
134
|
-
description: ( localize(
|
|
134
|
+
description: ( localize(3141, "Enables chat participant autodetection for panel chat.")),
|
|
135
135
|
default: null
|
|
136
136
|
},
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(
|
|
139
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(3142, "Chat"))), [
|
|
140
140
|
( (new SyncDescriptor(ChatEditorInput)))
|
|
141
141
|
]);
|
|
142
142
|
let ChatResolverContribution = class ChatResolverContribution extends Disposable {
|
|
@@ -145,7 +145,7 @@ let ChatResolverContribution = class ChatResolverContribution extends Disposable
|
|
|
145
145
|
super();
|
|
146
146
|
this._register(editorResolverService.registerEditor(`${Schemas.vscodeChatSesssion}:**/**`, {
|
|
147
147
|
id: ChatEditorInput.EditorID,
|
|
148
|
-
label: ( localize(
|
|
148
|
+
label: ( localize(3142, "Chat")),
|
|
149
149
|
priority: RegisteredEditorPriority.builtin
|
|
150
150
|
}, {
|
|
151
151
|
singlePerResource: true,
|
|
@@ -168,7 +168,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
168
168
|
super();
|
|
169
169
|
this._store.add(slashCommandService.registerSlashCommand({
|
|
170
170
|
command: 'clear',
|
|
171
|
-
detail: ( localize(
|
|
171
|
+
detail: ( localize(3143, "Start a new chat")),
|
|
172
172
|
sortText: 'z2_clear',
|
|
173
173
|
executeImmediately: true,
|
|
174
174
|
locations: [ChatAgentLocation.Panel]
|
|
@@ -217,7 +217,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
217
217
|
}
|
|
218
218
|
const variables = [
|
|
219
219
|
...chatVariablesService.getVariables(ChatAgentLocation.Panel),
|
|
220
|
-
{ name: 'file', description: ( localize(
|
|
220
|
+
{ name: 'file', description: ( localize(3144, "Choose a file in the workspace")) }
|
|
221
221
|
];
|
|
222
222
|
const variableText = ( (variables
|
|
223
223
|
.map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`)))
|
|
@@ -88,7 +88,7 @@ let ChatGettingStartedContribution = class ChatGettingStartedContribution extend
|
|
|
88
88
|
if (!showGettingStartedExp || showGettingStartedExp !== 'showBadge') {
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
const badge = ( (new NumberBadge(1, () => ( localize(
|
|
91
|
+
const badge = ( (new NumberBadge(1, () => ( localize(7328, 'Open Chat Panel')))));
|
|
92
92
|
this.showChatGettingStartedDisposable.value = this.activityService.showViewActivity(CHAT_VIEW_ID, { badge });
|
|
93
93
|
this.storageService.store(showChatGettingStartedConfigKey, showGettingStartedExp, -1 , 1 );
|
|
94
94
|
}
|
|
@@ -121,7 +121,7 @@ configurationRegistry.registerConfiguration({
|
|
|
121
121
|
default: '',
|
|
122
122
|
tags: ['experimental'],
|
|
123
123
|
description: ( localize(
|
|
124
|
-
|
|
124
|
+
7329,
|
|
125
125
|
"When enabled, shows a getting started experiments in the chat panel."
|
|
126
126
|
))
|
|
127
127
|
}
|
|
@@ -26,7 +26,7 @@ import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane } from './chatViewPane.js';
|
|
|
26
26
|
const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
27
27
|
extensionPoint: 'chatParticipants',
|
|
28
28
|
jsonSchema: {
|
|
29
|
-
description: ( localize(
|
|
29
|
+
description: ( localize(7330, 'Contributes a chat participant')),
|
|
30
30
|
type: 'array',
|
|
31
31
|
items: {
|
|
32
32
|
additionalProperties: false,
|
|
@@ -35,12 +35,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
35
35
|
required: ['name', 'id'],
|
|
36
36
|
properties: {
|
|
37
37
|
id: {
|
|
38
|
-
description: ( localize(
|
|
38
|
+
description: ( localize(7331, "A unique id for this chat participant.")),
|
|
39
39
|
type: 'string'
|
|
40
40
|
},
|
|
41
41
|
name: {
|
|
42
42
|
description: ( localize(
|
|
43
|
-
|
|
43
|
+
7332,
|
|
44
44
|
"User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
|
|
45
45
|
)),
|
|
46
46
|
type: 'string',
|
|
@@ -48,37 +48,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
48
48
|
},
|
|
49
49
|
fullName: {
|
|
50
50
|
markdownDescription: ( localize(
|
|
51
|
-
|
|
51
|
+
7333,
|
|
52
52
|
"The full name of this chat participant, which is shown as the label for responses coming from this participant. If not provided, {0} is used.",
|
|
53
53
|
'`name`'
|
|
54
54
|
)),
|
|
55
55
|
type: 'string'
|
|
56
56
|
},
|
|
57
57
|
description: {
|
|
58
|
-
description: ( localize(
|
|
58
|
+
description: ( localize(7334, "A description of this chat participant, shown in the UI.")),
|
|
59
59
|
type: 'string'
|
|
60
60
|
},
|
|
61
61
|
isSticky: {
|
|
62
62
|
description: ( localize(
|
|
63
|
-
|
|
63
|
+
7335,
|
|
64
64
|
"Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
|
|
65
65
|
)),
|
|
66
66
|
type: 'boolean'
|
|
67
67
|
},
|
|
68
68
|
sampleRequest: {
|
|
69
69
|
description: ( localize(
|
|
70
|
-
|
|
70
|
+
7336,
|
|
71
71
|
"When the user clicks this participant in `/help`, this text will be submitted to the participant."
|
|
72
72
|
)),
|
|
73
73
|
type: 'string'
|
|
74
74
|
},
|
|
75
75
|
when: {
|
|
76
|
-
description: ( localize(
|
|
76
|
+
description: ( localize(7337, "A condition which must be true to enable this participant.")),
|
|
77
77
|
type: 'string'
|
|
78
78
|
},
|
|
79
79
|
disambiguation: {
|
|
80
80
|
description: ( localize(
|
|
81
|
-
|
|
81
|
+
7338,
|
|
82
82
|
"Metadata to help with automatically routing user questions to this chat participant."
|
|
83
83
|
)),
|
|
84
84
|
type: 'array',
|
|
@@ -90,21 +90,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
90
90
|
properties: {
|
|
91
91
|
category: {
|
|
92
92
|
markdownDescription: ( localize(
|
|
93
|
-
|
|
93
|
+
7339,
|
|
94
94
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
95
95
|
)),
|
|
96
96
|
type: 'string'
|
|
97
97
|
},
|
|
98
98
|
description: {
|
|
99
99
|
description: ( localize(
|
|
100
|
-
|
|
100
|
+
7340,
|
|
101
101
|
"A detailed description of the kinds of questions that are suitable for this chat participant."
|
|
102
102
|
)),
|
|
103
103
|
type: 'string'
|
|
104
104
|
},
|
|
105
105
|
examples: {
|
|
106
106
|
description: ( localize(
|
|
107
|
-
|
|
107
|
+
7341,
|
|
108
108
|
"A list of representative example questions that are suitable for this chat participant."
|
|
109
109
|
)),
|
|
110
110
|
type: 'array'
|
|
@@ -114,7 +114,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
114
114
|
},
|
|
115
115
|
commands: {
|
|
116
116
|
markdownDescription: ( localize(
|
|
117
|
-
|
|
117
|
+
7342,
|
|
118
118
|
"Commands available for this chat participant, which the user can invoke with a `/`."
|
|
119
119
|
)),
|
|
120
120
|
type: 'array',
|
|
@@ -126,36 +126,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
126
126
|
properties: {
|
|
127
127
|
name: {
|
|
128
128
|
description: ( localize(
|
|
129
|
-
|
|
129
|
+
7343,
|
|
130
130
|
"A short name by which this command is referred to in the UI, e.g. `fix` or * `explain` for commands that fix an issue or explain code. The name should be unique among the commands provided by this participant."
|
|
131
131
|
)),
|
|
132
132
|
type: 'string'
|
|
133
133
|
},
|
|
134
134
|
description: {
|
|
135
|
-
description: ( localize(
|
|
135
|
+
description: ( localize(7344, "A description of this command.")),
|
|
136
136
|
type: 'string'
|
|
137
137
|
},
|
|
138
138
|
when: {
|
|
139
|
-
description: ( localize(
|
|
139
|
+
description: ( localize(7345, "A condition which must be true to enable this command.")),
|
|
140
140
|
type: 'string'
|
|
141
141
|
},
|
|
142
142
|
sampleRequest: {
|
|
143
143
|
description: ( localize(
|
|
144
|
-
|
|
144
|
+
7346,
|
|
145
145
|
"When the user clicks this command in `/help`, this text will be submitted to the participant."
|
|
146
146
|
)),
|
|
147
147
|
type: 'string'
|
|
148
148
|
},
|
|
149
149
|
isSticky: {
|
|
150
150
|
description: ( localize(
|
|
151
|
-
|
|
151
|
+
7335,
|
|
152
152
|
"Whether invoking the command puts the chat into a persistent mode, where the command is automatically added to the chat input for the next message."
|
|
153
153
|
)),
|
|
154
154
|
type: 'boolean'
|
|
155
155
|
},
|
|
156
156
|
disambiguation: {
|
|
157
157
|
description: ( localize(
|
|
158
|
-
|
|
158
|
+
7347,
|
|
159
159
|
"Metadata to help with automatically routing user questions to this chat command."
|
|
160
160
|
)),
|
|
161
161
|
type: 'array',
|
|
@@ -167,21 +167,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
167
167
|
properties: {
|
|
168
168
|
category: {
|
|
169
169
|
markdownDescription: ( localize(
|
|
170
|
-
|
|
170
|
+
7348,
|
|
171
171
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
172
172
|
)),
|
|
173
173
|
type: 'string'
|
|
174
174
|
},
|
|
175
175
|
description: {
|
|
176
176
|
description: ( localize(
|
|
177
|
-
|
|
177
|
+
7349,
|
|
178
178
|
"A detailed description of the kinds of questions that are suitable for this chat command."
|
|
179
179
|
)),
|
|
180
180
|
type: 'string'
|
|
181
181
|
},
|
|
182
182
|
examples: {
|
|
183
183
|
description: ( localize(
|
|
184
|
-
|
|
184
|
+
7350,
|
|
185
185
|
"A list of representative example questions that are suitable for this chat command."
|
|
186
186
|
)),
|
|
187
187
|
type: 'array'
|
|
@@ -194,7 +194,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
194
194
|
},
|
|
195
195
|
supportsToolReferences: {
|
|
196
196
|
description: ( localize(
|
|
197
|
-
|
|
197
|
+
7351,
|
|
198
198
|
"Whether this participant supports {0}.",
|
|
199
199
|
'ChatRequest#toolReferences'
|
|
200
200
|
)),
|
|
@@ -299,7 +299,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
registerViewContainer() {
|
|
302
|
-
const title = ( localize2(
|
|
302
|
+
const title = ( localize2(7352, "Chat"));
|
|
303
303
|
const icon = Codicon.commentDiscussion;
|
|
304
304
|
const viewContainerId = CHAT_SIDEBAR_PANEL_ID;
|
|
305
305
|
const viewContainer = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
|
|
@@ -366,9 +366,9 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
|
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
368
|
this.registeredWelcomeView = true;
|
|
369
|
-
const showExtensionLabel = ( localize(
|
|
369
|
+
const showExtensionLabel = ( localize(7353, "Show Extension"));
|
|
370
370
|
const mainMessage = ( localize(
|
|
371
|
-
|
|
371
|
+
7354,
|
|
372
372
|
"Chat failed to load because the installed version of the {0} extension is not compatible with this version of {1}. Please ensure that the GitHub Copilot Chat extension is up to date.",
|
|
373
373
|
'GitHub Copilot Chat',
|
|
374
374
|
this.productService.nameLong
|
|
@@ -61,7 +61,7 @@ let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
getAccessibleContent(hoverPart) {
|
|
64
|
-
return ( localize(
|
|
64
|
+
return ( localize(7356, 'There is a chat agent hover part here.'));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
ChatAgentHoverParticipant = ( (__decorate([
|
|
@@ -246,7 +246,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
246
246
|
const liveSessionItems = ( (Array.from(( (this._sessionModels.values())))
|
|
247
247
|
.filter(session => !session.isImported)
|
|
248
248
|
.map(session => {
|
|
249
|
-
const title = session.title || ( localize(
|
|
249
|
+
const title = session.title || ( localize(3120, "New Chat"));
|
|
250
250
|
return {
|
|
251
251
|
sessionId: session.sessionId,
|
|
252
252
|
title,
|
|
@@ -531,7 +531,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
531
531
|
else {
|
|
532
532
|
if (!rawResult) {
|
|
533
533
|
this.trace('sendRequest', `Provider returned no response for session ${model.sessionId}`);
|
|
534
|
-
rawResult = { errorDetails: { message: ( localize(
|
|
534
|
+
rawResult = { errorDetails: { message: ( localize(3121, "Provider returned null response")) } };
|
|
535
535
|
}
|
|
536
536
|
const result = rawResult.errorDetails?.responseIsFiltered ? 'filtered' :
|
|
537
537
|
rawResult.errorDetails && gotProgress ? 'errorWithOutput' :
|
|
@@ -120,8 +120,8 @@ LanguageModelStatsService = LanguageModelStatsService_1 = ( (__decorate([
|
|
|
120
120
|
], LanguageModelStatsService)));
|
|
121
121
|
( (Registry.as(Extensions.ExtensionFeaturesRegistry))).registerExtensionFeature({
|
|
122
122
|
id: 'languageModels',
|
|
123
|
-
label: ( localize(
|
|
124
|
-
description: ( localize(
|
|
123
|
+
label: ( localize(3145, "Language Models")),
|
|
124
|
+
description: ( localize(3146, "Language models usage statistics of this extension.")),
|
|
125
125
|
access: {
|
|
126
126
|
canToggle: false
|
|
127
127
|
},
|
|
@@ -108,9 +108,9 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
108
108
|
return undefined;
|
|
109
109
|
}
|
|
110
110
|
return (await tool.impl.provideToolConfirmationMessages(participantName, dto.parameters, token)) ?? {
|
|
111
|
-
title: ( localize(
|
|
111
|
+
title: ( localize(3151, "Use {0}?", `"${tool.data.displayName ?? tool.data.id}"`)),
|
|
112
112
|
message: ( localize(
|
|
113
|
-
|
|
113
|
+
3152,
|
|
114
114
|
"{0} will use {1}.",
|
|
115
115
|
participantName,
|
|
116
116
|
`"${tool.data.displayName ?? tool.data.id}"`
|
|
@@ -121,7 +121,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
121
121
|
tool.impl.provideToolInvocationMessage(dto.parameters, token),
|
|
122
122
|
getConfirmationMessages()
|
|
123
123
|
]);
|
|
124
|
-
const defaultMessage = ( localize(
|
|
124
|
+
const defaultMessage = ( localize(3153, "Using {0}", `"${tool.data.displayName ?? tool.data.id}"`));
|
|
125
125
|
toolInvocation = ( (new ChatToolInvocation(invocationMessage ?? defaultMessage, confirmationMessages)));
|
|
126
126
|
token.onCancellationRequested(() => {
|
|
127
127
|
toolInvocation.confirmed.complete(false);
|
|
@@ -17,14 +17,14 @@ const languageModelType = {
|
|
|
17
17
|
properties: {
|
|
18
18
|
vendor: {
|
|
19
19
|
type: 'string',
|
|
20
|
-
description: ( localize(
|
|
20
|
+
description: ( localize(3122, "A globally unique vendor of language models."))
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
const languageModelExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
25
25
|
extensionPoint: 'languageModels',
|
|
26
26
|
jsonSchema: {
|
|
27
|
-
description: ( localize(
|
|
27
|
+
description: ( localize(3123, "Contribute language models of a specific vendor.")),
|
|
28
28
|
oneOf: [
|
|
29
29
|
languageModelType,
|
|
30
30
|
{
|
|
@@ -54,24 +54,24 @@ let LanguageModelsService = class LanguageModelsService {
|
|
|
54
54
|
this._vendors.clear();
|
|
55
55
|
for (const extension of extensions) {
|
|
56
56
|
if (!isProposedApiEnabled(extension.description, 'chatProvider')) {
|
|
57
|
-
extension.collector.error(( localize(
|
|
57
|
+
extension.collector.error(( localize(3124, "This contribution point requires the 'chatProvider' proposal.")));
|
|
58
58
|
continue;
|
|
59
59
|
}
|
|
60
60
|
for (const item of Iterable.wrap(extension.value)) {
|
|
61
61
|
if (( (this._vendors.has(item.vendor)))) {
|
|
62
62
|
extension.collector.error(( localize(
|
|
63
|
-
|
|
63
|
+
3125,
|
|
64
64
|
"The vendor '{0}' is already registered and cannot be registered twice",
|
|
65
65
|
item.vendor
|
|
66
66
|
)));
|
|
67
67
|
continue;
|
|
68
68
|
}
|
|
69
69
|
if (isFalsyOrWhitespace(item.vendor)) {
|
|
70
|
-
extension.collector.error(( localize(
|
|
70
|
+
extension.collector.error(( localize(3126, "The vendor field cannot be empty.")));
|
|
71
71
|
continue;
|
|
72
72
|
}
|
|
73
73
|
if (item.vendor.trim() !== item.vendor) {
|
|
74
|
-
extension.collector.error(( localize(
|
|
74
|
+
extension.collector.error(( localize(3127, "The vendor field cannot start or end with whitespace.")));
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
77
|
this._vendors.add(item.vendor);
|
|
@@ -16,7 +16,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
jsonSchema: {
|
|
19
|
-
description: ( localize(
|
|
19
|
+
description: ( localize(7226, 'Contributes a tool that can be invoked by a language model.')),
|
|
20
20
|
type: 'array',
|
|
21
21
|
items: {
|
|
22
22
|
additionalProperties: false,
|
|
@@ -25,13 +25,13 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
25
25
|
required: ['id', 'modelDescription'],
|
|
26
26
|
properties: {
|
|
27
27
|
id: {
|
|
28
|
-
description: ( localize(
|
|
28
|
+
description: ( localize(7227, "A unique id for this tool.")),
|
|
29
29
|
type: 'string',
|
|
30
30
|
pattern: '^[\\w-]+$'
|
|
31
31
|
},
|
|
32
32
|
name: {
|
|
33
33
|
description: ( localize(
|
|
34
|
-
|
|
34
|
+
7228,
|
|
35
35
|
"If {0} is enabled for this tool, the user may use '#' with this name to invoke the tool in a query. Otherwise, the name is not required. Name must not contain whitespace.",
|
|
36
36
|
'`canBeInvokedManually`'
|
|
37
37
|
)),
|
|
@@ -40,34 +40,34 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
40
40
|
},
|
|
41
41
|
displayName: {
|
|
42
42
|
description: ( localize(
|
|
43
|
-
|
|
43
|
+
7229,
|
|
44
44
|
"A human-readable name for this tool that may be used to describe it in the UI."
|
|
45
45
|
)),
|
|
46
46
|
type: 'string'
|
|
47
47
|
},
|
|
48
48
|
userDescription: {
|
|
49
|
-
description: ( localize(
|
|
49
|
+
description: ( localize(7230, "A description of this tool that may be shown to the user.")),
|
|
50
50
|
type: 'string'
|
|
51
51
|
},
|
|
52
52
|
modelDescription: {
|
|
53
|
-
description: ( localize(
|
|
53
|
+
description: ( localize(7231, "A description of this tool that may be passed to a language model.")),
|
|
54
54
|
type: 'string'
|
|
55
55
|
},
|
|
56
56
|
parametersSchema: {
|
|
57
|
-
description: ( localize(
|
|
57
|
+
description: ( localize(7232, "A JSON schema for the parameters this tool accepts.")),
|
|
58
58
|
type: 'object',
|
|
59
59
|
$ref: 'http://json-schema.org/draft-07/schema#'
|
|
60
60
|
},
|
|
61
61
|
canBeInvokedManually: {
|
|
62
62
|
description: ( localize(
|
|
63
|
-
|
|
63
|
+
7233,
|
|
64
64
|
"Whether this tool can be invoked manually by the user through the chat UX."
|
|
65
65
|
)),
|
|
66
66
|
type: 'boolean'
|
|
67
67
|
},
|
|
68
68
|
icon: {
|
|
69
69
|
description: ( localize(
|
|
70
|
-
|
|
70
|
+
7234,
|
|
71
71
|
"An icon that represents this tool. Either a file path, an object with file paths for dark and light themes, or a theme icon reference, like `\\$(zap)`"
|
|
72
72
|
)),
|
|
73
73
|
anyOf: [{
|
|
@@ -77,11 +77,11 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
77
77
|
type: 'object',
|
|
78
78
|
properties: {
|
|
79
79
|
light: {
|
|
80
|
-
description: ( localize(
|
|
80
|
+
description: ( localize(7235, 'Icon path when a light theme is used')),
|
|
81
81
|
type: 'string'
|
|
82
82
|
},
|
|
83
83
|
dark: {
|
|
84
|
-
description: ( localize(
|
|
84
|
+
description: ( localize(7236, 'Icon path when a dark theme is used')),
|
|
85
85
|
type: 'string'
|
|
86
86
|
}
|
|
87
87
|
}
|
|
@@ -89,14 +89,14 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
89
89
|
},
|
|
90
90
|
when: {
|
|
91
91
|
markdownDescription: ( localize(
|
|
92
|
-
|
|
92
|
+
7237,
|
|
93
93
|
"Condition which must be true for this tool to be enabled. Note that a tool may still be invoked by another extension even when its `when` condition is false."
|
|
94
94
|
)),
|
|
95
95
|
type: 'string'
|
|
96
96
|
},
|
|
97
97
|
supportedContentTypes: {
|
|
98
98
|
markdownDescription: ( localize(
|
|
99
|
-
|
|
99
|
+
7238,
|
|
100
100
|
"The list of content types that this tool can return. It's required that tools support `text/plain`, and that is assumed even if not specified here. Another example could be the contentType exported by the `@vscode/prompt-tsx` library."
|
|
101
101
|
)),
|
|
102
102
|
type: 'array',
|
|
@@ -106,7 +106,7 @@ const languageModelToolsExtensionPoint = ExtensionsRegistry.registerExtensionPoi
|
|
|
106
106
|
},
|
|
107
107
|
requiresConfirmation: {
|
|
108
108
|
description: ( localize(
|
|
109
|
-
|
|
109
|
+
7239,
|
|
110
110
|
"Whether this tool requires user confirmation before being executed."
|
|
111
111
|
)),
|
|
112
112
|
type: 'boolean'
|
|
@@ -20,7 +20,7 @@ var PhraseTextType;
|
|
|
20
20
|
const VoiceChatInProgress = ( (new RawContextKey(
|
|
21
21
|
'voiceChatInProgress',
|
|
22
22
|
false,
|
|
23
|
-
{ type: 'boolean', description: ( localize(
|
|
23
|
+
{ type: 'boolean', description: ( localize(7240, "A speech-to-text session is in progress for chat.")) }
|
|
24
24
|
)));
|
|
25
25
|
let VoiceChatService = class VoiceChatService extends Disposable {
|
|
26
26
|
static { VoiceChatService_1 = this; }
|
|
@@ -26,7 +26,7 @@ const editActionMenuItem = {
|
|
|
26
26
|
order: 0,
|
|
27
27
|
command: {
|
|
28
28
|
id: SubmitAction.ID,
|
|
29
|
-
title: ( localize(
|
|
29
|
+
title: ( localize(3147, "Edit Code")),
|
|
30
30
|
},
|
|
31
31
|
when: ( (ContextKeyExpr.and(
|
|
32
32
|
CONTEXT_CHAT_INPUT_HAS_TEXT,
|
|
@@ -39,7 +39,7 @@ const generateActionMenuItem = {
|
|
|
39
39
|
order: 0,
|
|
40
40
|
command: {
|
|
41
41
|
id: SubmitAction.ID,
|
|
42
|
-
title: ( localize(
|
|
42
|
+
title: ( localize(3148, "Generate")),
|
|
43
43
|
},
|
|
44
44
|
when: ( (ContextKeyExpr.and(
|
|
45
45
|
CONTEXT_CHAT_INPUT_HAS_TEXT,
|
|
@@ -54,8 +54,8 @@ const cancelActionMenuItem = {
|
|
|
54
54
|
order: 0,
|
|
55
55
|
command: {
|
|
56
56
|
id: CancelAction.ID,
|
|
57
|
-
title: ( localize(
|
|
58
|
-
shortTitle: ( localize(
|
|
57
|
+
title: ( localize(3149, "Cancel Request")),
|
|
58
|
+
shortTitle: ( localize(3150, "Cancel")),
|
|
59
59
|
},
|
|
60
60
|
when: ( (ContextKeyExpr.and(CTX_INLINE_CHAT_REQUEST_IN_PROGRESS))),
|
|
61
61
|
};
|
|
@@ -14,7 +14,7 @@ import { AbstractInlineChatAction } from 'vscode/vscode/vs/workbench/contrib/inl
|
|
|
14
14
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
15
15
|
|
|
16
16
|
const CTX_INLINE_CHAT_EXPANSION = ( (new RawContextKey('inlineChatExpansion', false, ( localize(
|
|
17
|
-
|
|
17
|
+
7375,
|
|
18
18
|
"Whether the inline chat expansion is enabled when at the end of a just-typed line"
|
|
19
19
|
)))));
|
|
20
20
|
let InlineChatExansionContextKey = class InlineChatExansionContextKey {
|
|
@@ -84,7 +84,7 @@ class InlineChatExpandLineAction extends EditorAction2 {
|
|
|
84
84
|
super({
|
|
85
85
|
id: 'inlineChat.startWithCurrentLine',
|
|
86
86
|
category: AbstractInlineChatAction.category,
|
|
87
|
-
title: ( localize2(
|
|
87
|
+
title: ( localize2(7376, "Start in Editor with Current Line")),
|
|
88
88
|
f1: true,
|
|
89
89
|
precondition: ( (ContextKeyExpr.and(
|
|
90
90
|
(CTX_INLINE_CHAT_VISIBLE.negate()),
|
|
@@ -100,9 +100,9 @@ let InlineChatSavingServiceImpl = class InlineChatSavingServiceImpl {
|
|
|
100
100
|
}
|
|
101
101
|
progress.report({
|
|
102
102
|
message: sessions.size === 1
|
|
103
|
-
? ( localize(
|
|
103
|
+
? ( localize(3128, "Waiting for Inline Chat changes to be Accepted or Discarded..."))
|
|
104
104
|
: ( localize(
|
|
105
|
-
|
|
105
|
+
3129,
|
|
106
106
|
"Waiting for Inline Chat changes in {0} editors to be Accepted or Discarded...",
|
|
107
107
|
sessions.size
|
|
108
108
|
))
|