@codingame/monaco-vscode-chat-service-override 10.0.0 → 10.0.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/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.0.
|
|
3
|
+
"version": "10.0.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.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@10.0.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
|
+
7214,
|
|
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
|
+
7215,
|
|
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
|
+
7216,
|
|
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
|
+
7217,
|
|
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
|
+
7218,
|
|
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
|
+
7219,
|
|
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
|
+
7220,
|
|
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
|
+
7221,
|
|
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
|
+
7222,
|
|
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
|
+
7223,
|
|
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
|
+
7224,
|
|
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
|
+
7225,
|
|
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
|
+
7226,
|
|
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
|
+
7227,
|
|
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
|
+
7228,
|
|
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
|
+
7229,
|
|
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
|
+
7230,
|
|
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
|
+
7231,
|
|
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
|
+
7232,
|
|
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');
|
|
@@ -19,7 +19,7 @@ function registerNewChatActions() {
|
|
|
19
19
|
constructor() {
|
|
20
20
|
super({
|
|
21
21
|
id: 'workbench.action.chatEditor.newChat',
|
|
22
|
-
title: ( localize2(
|
|
22
|
+
title: ( localize2(7233, "New Chat")),
|
|
23
23
|
icon: Codicon.plus,
|
|
24
24
|
f1: false,
|
|
25
25
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -40,7 +40,7 @@ function registerNewChatActions() {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: ACTION_ID_NEW_CHAT,
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(7233, "New Chat")),
|
|
44
44
|
category: CHAT_CATEGORY,
|
|
45
45
|
icon: Codicon.plus,
|
|
46
46
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -63,7 +63,7 @@ function registerChatCodeBlockActions() {
|
|
|
63
63
|
constructor() {
|
|
64
64
|
super({
|
|
65
65
|
id: 'workbench.action.chat.copyCodeBlock',
|
|
66
|
-
title: ( localize2(
|
|
66
|
+
title: ( localize2(7234, "Copy")),
|
|
67
67
|
f1: false,
|
|
68
68
|
category: CHAT_CATEGORY,
|
|
69
69
|
icon: Codicon.copy,
|
|
@@ -148,7 +148,7 @@ function registerChatCodeBlockActions() {
|
|
|
148
148
|
constructor() {
|
|
149
149
|
super({
|
|
150
150
|
id: 'workbench.action.chat.applyInEditor',
|
|
151
|
-
title: ( localize2(
|
|
151
|
+
title: ( localize2(7235, "Apply in Editor")),
|
|
152
152
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
153
153
|
f1: true,
|
|
154
154
|
category: CHAT_CATEGORY,
|
|
@@ -183,7 +183,7 @@ function registerChatCodeBlockActions() {
|
|
|
183
183
|
constructor() {
|
|
184
184
|
super({
|
|
185
185
|
id: 'workbench.action.chat.applyAll',
|
|
186
|
-
title: ( localize2(
|
|
186
|
+
title: ( localize2(7236, "Apply All Edits")),
|
|
187
187
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
188
188
|
f1: true,
|
|
189
189
|
category: CHAT_CATEGORY,
|
|
@@ -226,7 +226,7 @@ function registerChatCodeBlockActions() {
|
|
|
226
226
|
constructor() {
|
|
227
227
|
super({
|
|
228
228
|
id: 'workbench.action.chat.insertCodeBlock',
|
|
229
|
-
title: ( localize2(
|
|
229
|
+
title: ( localize2(7237, "Insert At Cursor")),
|
|
230
230
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
231
231
|
f1: true,
|
|
232
232
|
category: CHAT_CATEGORY,
|
|
@@ -257,7 +257,7 @@ function registerChatCodeBlockActions() {
|
|
|
257
257
|
constructor() {
|
|
258
258
|
super({
|
|
259
259
|
id: 'workbench.action.chat.insertIntoNewFile',
|
|
260
|
-
title: ( localize2(
|
|
260
|
+
title: ( localize2(7238, "Insert into New File")),
|
|
261
261
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
262
262
|
f1: true,
|
|
263
263
|
category: CHAT_CATEGORY,
|
|
@@ -298,7 +298,7 @@ function registerChatCodeBlockActions() {
|
|
|
298
298
|
constructor() {
|
|
299
299
|
super({
|
|
300
300
|
id: 'workbench.action.chat.runInTerminal',
|
|
301
|
-
title: ( localize2(
|
|
301
|
+
title: ( localize2(7239, "Insert into Terminal")),
|
|
302
302
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
303
303
|
f1: true,
|
|
304
304
|
category: CHAT_CATEGORY,
|
|
@@ -398,7 +398,7 @@ function registerChatCodeBlockActions() {
|
|
|
398
398
|
constructor() {
|
|
399
399
|
super({
|
|
400
400
|
id: 'workbench.action.chat.nextCodeBlock',
|
|
401
|
-
title: ( localize2(
|
|
401
|
+
title: ( localize2(7240, "Next Code Block")),
|
|
402
402
|
keybinding: {
|
|
403
403
|
primary: 2048 | 512 | 12 ,
|
|
404
404
|
mac: { primary: 2048 | 512 | 12 , },
|
|
@@ -418,7 +418,7 @@ function registerChatCodeBlockActions() {
|
|
|
418
418
|
constructor() {
|
|
419
419
|
super({
|
|
420
420
|
id: 'workbench.action.chat.previousCodeBlock',
|
|
421
|
-
title: ( localize2(
|
|
421
|
+
title: ( localize2(7241, "Previous Code Block")),
|
|
422
422
|
keybinding: {
|
|
423
423
|
primary: 2048 | 512 | 11 ,
|
|
424
424
|
mac: { primary: 2048 | 512 | 11 , },
|
|
@@ -475,7 +475,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
475
475
|
constructor() {
|
|
476
476
|
super({
|
|
477
477
|
id: 'workbench.action.chat.applyCompareEdits',
|
|
478
|
-
title: ( localize2(
|
|
478
|
+
title: ( localize2(7242, "Apply Edits")),
|
|
479
479
|
f1: false,
|
|
480
480
|
category: CHAT_CATEGORY,
|
|
481
481
|
icon: Codicon.check,
|
|
@@ -505,7 +505,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
505
505
|
constructor() {
|
|
506
506
|
super({
|
|
507
507
|
id: 'workbench.action.chat.discardCompareEdits',
|
|
508
|
-
title: ( localize2(
|
|
508
|
+
title: ( localize2(7243, "Discard Edits")),
|
|
509
509
|
f1: false,
|
|
510
510
|
category: CHAT_CATEGORY,
|
|
511
511
|
icon: Codicon.trash,
|
|
@@ -41,7 +41,7 @@ class AttachFileAction extends Action2 {
|
|
|
41
41
|
constructor() {
|
|
42
42
|
super({
|
|
43
43
|
id: AttachFileAction.ID,
|
|
44
|
-
title: ( localize2(
|
|
44
|
+
title: ( localize2(7244, "Add File to Chat")),
|
|
45
45
|
category: CHAT_CATEGORY,
|
|
46
46
|
f1: false,
|
|
47
47
|
precondition: ( (ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor'))),
|
|
@@ -67,7 +67,7 @@ class AttachSelectionAction extends Action2 {
|
|
|
67
67
|
constructor() {
|
|
68
68
|
super({
|
|
69
69
|
id: AttachSelectionAction.ID,
|
|
70
|
-
title: ( localize2(
|
|
70
|
+
title: ( localize2(7245, "Add Selection to Chat")),
|
|
71
71
|
category: CHAT_CATEGORY,
|
|
72
72
|
f1: false,
|
|
73
73
|
precondition: ( (ActiveEditorContext.isEqualTo('workbench.editors.files.textFileEditor'))),
|
|
@@ -112,7 +112,7 @@ class AttachContextAction extends Action2 {
|
|
|
112
112
|
constructor() {
|
|
113
113
|
super({
|
|
114
114
|
id: AttachContextAction.ID,
|
|
115
|
-
title: ( localize2(
|
|
115
|
+
title: ( localize2(7246, "Attach Context")),
|
|
116
116
|
icon: Codicon.attach,
|
|
117
117
|
category: CHAT_CATEGORY,
|
|
118
118
|
precondition: AttachContextAction._cdt,
|
|
@@ -226,8 +226,8 @@ class AttachContextAction extends Action2 {
|
|
|
226
226
|
const fileBuffer = await clipboardService.readImage();
|
|
227
227
|
toAttach.push({
|
|
228
228
|
id: await imageToHash(fileBuffer),
|
|
229
|
-
name: ( localize(
|
|
230
|
-
fullName: ( localize(
|
|
229
|
+
name: ( localize(7247, 'Pasted Image')),
|
|
230
|
+
fullName: ( localize(7247, 'Pasted Image')),
|
|
231
231
|
value: fileBuffer,
|
|
232
232
|
isDynamic: true,
|
|
233
233
|
isImage: true
|
|
@@ -282,7 +282,7 @@ class AttachContextAction extends Action2 {
|
|
|
282
282
|
quickPickItems.push({
|
|
283
283
|
id: await imageToHash(imageData),
|
|
284
284
|
kind: 'image',
|
|
285
|
-
label: ( localize(
|
|
285
|
+
label: ( localize(7248, 'Image from Clipboard')),
|
|
286
286
|
iconClass: ThemeIcon.asClassName(Codicon.fileMedia),
|
|
287
287
|
});
|
|
288
288
|
}
|
|
@@ -327,7 +327,7 @@ class AttachContextAction extends Action2 {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
quickPickItems.push({
|
|
330
|
-
label: ( localize(
|
|
330
|
+
label: ( localize(7249, 'Symbol...')),
|
|
331
331
|
icon: ThemeIcon.fromId(Codicon.symbolField.id),
|
|
332
332
|
iconClass: ThemeIcon.asClassName(Codicon.symbolField),
|
|
333
333
|
prefix: SymbolsQuickAccessProvider.PREFIX
|
|
@@ -340,10 +340,10 @@ class AttachContextAction extends Action2 {
|
|
|
340
340
|
icon: ThemeIcon.fromId(Codicon.serverEnvironment.id),
|
|
341
341
|
iconClass: ThemeIcon.asClassName(Codicon.serverEnvironment),
|
|
342
342
|
value: 'kernelVariable',
|
|
343
|
-
label: ( localize(
|
|
343
|
+
label: ( localize(7250, 'Kernel Variable...')),
|
|
344
344
|
command: {
|
|
345
345
|
id: 'notebook.chat.selectAndInsertKernelVariable',
|
|
346
|
-
title: ( localize(
|
|
346
|
+
title: ( localize(7251, 'Select and Insert Kernel Variable')),
|
|
347
347
|
arguments: [{ widget, range: undefined }]
|
|
348
348
|
}
|
|
349
349
|
});
|
|
@@ -368,7 +368,7 @@ class AttachContextAction extends Action2 {
|
|
|
368
368
|
SymbolsQuickAccessProvider.PREFIX,
|
|
369
369
|
AbstractGotoSymbolQuickAccessProvider.PREFIX
|
|
370
370
|
],
|
|
371
|
-
placeholder: ( localize(
|
|
371
|
+
placeholder: ( localize(7252, 'Search attachments')),
|
|
372
372
|
providerOptions: {
|
|
373
373
|
handleAccept: (item) => {
|
|
374
374
|
if ('prefix' in item) {
|
|
@@ -11,7 +11,7 @@ function registerChatCopyActions() {
|
|
|
11
11
|
constructor() {
|
|
12
12
|
super({
|
|
13
13
|
id: 'workbench.action.chat.copyAll',
|
|
14
|
-
title: ( localize2(
|
|
14
|
+
title: ( localize2(7253, "Copy All")),
|
|
15
15
|
f1: false,
|
|
16
16
|
category: CHAT_CATEGORY,
|
|
17
17
|
menu: {
|
|
@@ -41,7 +41,7 @@ function registerChatCopyActions() {
|
|
|
41
41
|
constructor() {
|
|
42
42
|
super({
|
|
43
43
|
id: 'workbench.action.chat.copyItem',
|
|
44
|
-
title: ( localize2(
|
|
44
|
+
title: ( localize2(7254, "Copy")),
|
|
45
45
|
f1: false,
|
|
46
46
|
category: CHAT_CATEGORY,
|
|
47
47
|
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(7255, "Log Chat Input History")),
|
|
16
16
|
icon: Codicon.attach,
|
|
17
17
|
category: Categories.Developer,
|
|
18
18
|
f1: true
|
|
@@ -10,7 +10,7 @@ function registerChatFileTreeActions() {
|
|
|
10
10
|
constructor() {
|
|
11
11
|
super({
|
|
12
12
|
id: 'workbench.action.chat.nextFileTree',
|
|
13
|
-
title: ( localize2(
|
|
13
|
+
title: ( localize2(7256, "Next File Tree")),
|
|
14
14
|
keybinding: {
|
|
15
15
|
primary: 2048 | 67 ,
|
|
16
16
|
weight: 200 ,
|
|
@@ -29,7 +29,7 @@ function registerChatFileTreeActions() {
|
|
|
29
29
|
constructor() {
|
|
30
30
|
super({
|
|
31
31
|
id: 'workbench.action.chat.previousFileTree',
|
|
32
|
-
title: ( localize2(
|
|
32
|
+
title: ( localize2(7257, "Previous File Tree")),
|
|
33
33
|
keybinding: {
|
|
34
34
|
primary: 2048 | 1024 | 67 ,
|
|
35
35
|
weight: 200 ,
|
|
@@ -13,14 +13,14 @@ import { IChatService } from 'vscode/vscode/vs/workbench/contrib/chat/common/cha
|
|
|
13
13
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
14
14
|
|
|
15
15
|
const defaultFileName = 'chat.json';
|
|
16
|
-
const filters = [{ name: ( localize(
|
|
16
|
+
const filters = [{ name: ( localize(7258, "Chat Session")), extensions: ['json'] }];
|
|
17
17
|
function registerChatExportActions() {
|
|
18
18
|
registerAction2(class ExportChatAction extends Action2 {
|
|
19
19
|
constructor() {
|
|
20
20
|
super({
|
|
21
21
|
id: 'workbench.action.chat.export',
|
|
22
22
|
category: CHAT_CATEGORY,
|
|
23
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(7259, "Export Chat...")),
|
|
24
24
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
25
25
|
f1: true,
|
|
26
26
|
});
|
|
@@ -54,7 +54,7 @@ function registerChatExportActions() {
|
|
|
54
54
|
constructor() {
|
|
55
55
|
super({
|
|
56
56
|
id: 'workbench.action.chat.import',
|
|
57
|
-
title: ( localize2(
|
|
57
|
+
title: ( localize2(7260, "Import Chat...")),
|
|
58
58
|
category: CHAT_CATEGORY,
|
|
59
59
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
60
60
|
f1: true,
|
|
@@ -23,7 +23,7 @@ function registerMoveActions() {
|
|
|
23
23
|
constructor() {
|
|
24
24
|
super({
|
|
25
25
|
id: `workbench.action.chat.openInEditor`,
|
|
26
|
-
title: ( localize2(
|
|
26
|
+
title: ( localize2(7266, "Open Chat in Editor")),
|
|
27
27
|
category: CHAT_CATEGORY,
|
|
28
28
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
29
29
|
f1: true,
|
|
@@ -43,7 +43,7 @@ function registerMoveActions() {
|
|
|
43
43
|
constructor() {
|
|
44
44
|
super({
|
|
45
45
|
id: `workbench.action.chat.openInNewWindow`,
|
|
46
|
-
title: ( localize2(
|
|
46
|
+
title: ( localize2(7267, "Open Chat in New Window")),
|
|
47
47
|
category: CHAT_CATEGORY,
|
|
48
48
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
49
49
|
f1: true,
|
|
@@ -63,7 +63,7 @@ function registerMoveActions() {
|
|
|
63
63
|
constructor() {
|
|
64
64
|
super({
|
|
65
65
|
id: `workbench.action.chat.openInSidebar`,
|
|
66
|
-
title: ( localize2(
|
|
66
|
+
title: ( localize2(7268, "Open Chat in Side Bar")),
|
|
67
67
|
category: CHAT_CATEGORY,
|
|
68
68
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
69
69
|
f1: true,
|
|
@@ -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(3095, "Chat")),
|
|
67
67
|
type: 'object',
|
|
68
68
|
properties: {
|
|
69
69
|
'chat.editor.fontSize': {
|
|
70
70
|
type: 'number',
|
|
71
|
-
description: ( localize(
|
|
71
|
+
description: ( localize(3096, "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(3097, "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(3098, "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(3099, "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
|
+
3100,
|
|
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
|
+
3101,
|
|
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
|
+
3102,
|
|
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(3103, "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(3104, "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(3105, "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(3106, "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(3107, "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(3107, "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(3108, "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(3109, "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(7277, '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
|
+
7278,
|
|
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(7279, '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(7280, "A unique id for this chat participant.")),
|
|
39
39
|
type: 'string'
|
|
40
40
|
},
|
|
41
41
|
name: {
|
|
42
42
|
description: ( localize(
|
|
43
|
-
|
|
43
|
+
7281,
|
|
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
|
+
7282,
|
|
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(7283, "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
|
+
7284,
|
|
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
|
+
7285,
|
|
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(7286, "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
|
+
7287,
|
|
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
|
+
7288,
|
|
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
|
+
7289,
|
|
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
|
+
7290,
|
|
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
|
+
7291,
|
|
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
|
+
7292,
|
|
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(7293, "A description of this command.")),
|
|
136
136
|
type: 'string'
|
|
137
137
|
},
|
|
138
138
|
when: {
|
|
139
|
-
description: ( localize(
|
|
139
|
+
description: ( localize(7294, "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
|
+
7295,
|
|
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
|
+
7284,
|
|
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
|
+
7296,
|
|
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
|
+
7297,
|
|
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
|
+
7298,
|
|
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
|
+
7299,
|
|
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
|
+
7300,
|
|
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(7301, "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(7302, "Show Extension"));
|
|
370
370
|
const mainMessage = ( localize(
|
|
371
|
-
|
|
371
|
+
7303,
|
|
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(7305, '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(3083, "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(3084, "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(3093, "Language Models")),
|
|
124
|
+
description: ( localize(3094, "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(3114, "Use {0}?", `"${tool.data.displayName ?? tool.data.id}"`)),
|
|
112
112
|
message: ( localize(
|
|
113
|
-
|
|
113
|
+
3115,
|
|
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(3116, "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(3085, "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(3086, "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(3087, "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
|
+
3088,
|
|
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(3089, "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(3090, "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(7199, '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(7200, "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
|
+
7201,
|
|
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
|
+
7202,
|
|
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(7203, "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(7204, "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(7205, "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
|
+
7206,
|
|
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
|
+
7207,
|
|
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(7208, 'Icon path when a light theme is used')),
|
|
81
81
|
type: 'string'
|
|
82
82
|
},
|
|
83
83
|
dark: {
|
|
84
|
-
description: ( localize(
|
|
84
|
+
description: ( localize(7209, '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
|
+
7210,
|
|
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
|
+
7211,
|
|
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
|
+
7212,
|
|
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(7213, "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(3110, "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(3111, "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(3112, "Cancel Request")),
|
|
58
|
+
shortTitle: ( localize(3113, "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
|
+
7324,
|
|
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(7325, "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(3091, "Waiting for Inline Chat changes to be Accepted or Discarded..."))
|
|
104
104
|
: ( localize(
|
|
105
|
-
|
|
105
|
+
3092,
|
|
106
106
|
"Waiting for Inline Chat changes in {0} editors to be Accepted or Discarded...",
|
|
107
107
|
sessions.size
|
|
108
108
|
))
|