@codingame/monaco-vscode-chat-service-override 11.0.0 → 11.0.1
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 +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +16 -16
- 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/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/chatEditing/chatEditingModifiedFileEntry.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorController.js +11 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipantContributions.js +26 -26
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeContributions.js +5 -5
- 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/languageModels.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +13 -13
- 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 +6 -6
|
@@ -76,34 +76,34 @@ import { ChatGettingStartedContribution } from './actions/chatGettingStarted.js'
|
|
|
76
76
|
const configurationRegistry = ( (Registry.as(Extensions.Configuration)));
|
|
77
77
|
configurationRegistry.registerConfiguration({
|
|
78
78
|
id: 'chatSidebar',
|
|
79
|
-
title: ( localize(
|
|
79
|
+
title: ( localize(3196, "Chat")),
|
|
80
80
|
type: 'object',
|
|
81
81
|
properties: {
|
|
82
82
|
'chat.editor.fontSize': {
|
|
83
83
|
type: 'number',
|
|
84
|
-
description: ( localize(
|
|
84
|
+
description: ( localize(3197, "Controls the font size in pixels in chat codeblocks.")),
|
|
85
85
|
default: isMacintosh ? 12 : 14,
|
|
86
86
|
},
|
|
87
87
|
'chat.editor.fontFamily': {
|
|
88
88
|
type: 'string',
|
|
89
|
-
description: ( localize(
|
|
89
|
+
description: ( localize(3198, "Controls the font family in chat codeblocks.")),
|
|
90
90
|
default: 'default'
|
|
91
91
|
},
|
|
92
92
|
'chat.editor.fontWeight': {
|
|
93
93
|
type: 'string',
|
|
94
|
-
description: ( localize(
|
|
94
|
+
description: ( localize(3199, "Controls the font weight in chat codeblocks.")),
|
|
95
95
|
default: 'default'
|
|
96
96
|
},
|
|
97
97
|
'chat.editor.wordWrap': {
|
|
98
98
|
type: 'string',
|
|
99
|
-
description: ( localize(
|
|
99
|
+
description: ( localize(3200, "Controls whether lines should wrap in chat codeblocks.")),
|
|
100
100
|
default: 'off',
|
|
101
101
|
enum: ['on', 'off']
|
|
102
102
|
},
|
|
103
103
|
'chat.editor.lineHeight': {
|
|
104
104
|
type: 'number',
|
|
105
105
|
description: ( localize(
|
|
106
|
-
|
|
106
|
+
3201,
|
|
107
107
|
"Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."
|
|
108
108
|
)),
|
|
109
109
|
default: 0
|
|
@@ -112,7 +112,7 @@ configurationRegistry.registerConfiguration({
|
|
|
112
112
|
type: 'boolean',
|
|
113
113
|
tags: ['preview'],
|
|
114
114
|
markdownDescription: ( localize(
|
|
115
|
-
|
|
115
|
+
3202,
|
|
116
116
|
"Controls whether the command center shows a menu for chat actions (requires {0}).",
|
|
117
117
|
'`#window.commandCenter#`'
|
|
118
118
|
)),
|
|
@@ -122,7 +122,7 @@ configurationRegistry.registerConfiguration({
|
|
|
122
122
|
type: 'boolean',
|
|
123
123
|
scope: 1 ,
|
|
124
124
|
markdownDescription: ( localize(
|
|
125
|
-
|
|
125
|
+
3203,
|
|
126
126
|
"Whether to always ask before saving files with changes made by chat."
|
|
127
127
|
)),
|
|
128
128
|
default: false,
|
|
@@ -131,7 +131,7 @@ configurationRegistry.registerConfiguration({
|
|
|
131
131
|
type: 'boolean',
|
|
132
132
|
scope: 1 ,
|
|
133
133
|
markdownDescription: ( localize(
|
|
134
|
-
|
|
134
|
+
3204,
|
|
135
135
|
"Whether to show a confirmation before removing a request and its associated edits."
|
|
136
136
|
)),
|
|
137
137
|
default: true,
|
|
@@ -140,7 +140,7 @@ configurationRegistry.registerConfiguration({
|
|
|
140
140
|
type: 'boolean',
|
|
141
141
|
scope: 1 ,
|
|
142
142
|
markdownDescription: ( localize(
|
|
143
|
-
|
|
143
|
+
3205,
|
|
144
144
|
"Whether to show a confirmation before retrying a request and its associated edits."
|
|
145
145
|
)),
|
|
146
146
|
default: true,
|
|
@@ -149,19 +149,19 @@ configurationRegistry.registerConfiguration({
|
|
|
149
149
|
type: 'boolean',
|
|
150
150
|
scope: 1 ,
|
|
151
151
|
markdownDescription: ( localize(
|
|
152
|
-
|
|
152
|
+
3206,
|
|
153
153
|
"Whether to show a toggle to restore an earlier version of a file that was edited in a chat editing session request."
|
|
154
154
|
)),
|
|
155
155
|
default: false,
|
|
156
156
|
},
|
|
157
157
|
'chat.experimental.detectParticipant.enabled': {
|
|
158
158
|
type: 'boolean',
|
|
159
|
-
description: ( localize(
|
|
159
|
+
description: ( localize(3207, "Enables chat participant autodetection for panel chat.")),
|
|
160
160
|
default: null
|
|
161
161
|
},
|
|
162
162
|
}
|
|
163
163
|
});
|
|
164
|
-
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(
|
|
164
|
+
( (Registry.as(EditorExtensions.EditorPane))).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(3208, "Chat"))), [
|
|
165
165
|
( (new SyncDescriptor(ChatEditorInput)))
|
|
166
166
|
]);
|
|
167
167
|
let ChatResolverContribution = class ChatResolverContribution extends Disposable {
|
|
@@ -170,7 +170,7 @@ let ChatResolverContribution = class ChatResolverContribution extends Disposable
|
|
|
170
170
|
super();
|
|
171
171
|
this._register(editorResolverService.registerEditor(`${Schemas.vscodeChatSesssion}:**/**`, {
|
|
172
172
|
id: ChatEditorInput.EditorID,
|
|
173
|
-
label: ( localize(
|
|
173
|
+
label: ( localize(3208, "Chat")),
|
|
174
174
|
priority: RegisteredEditorPriority.builtin
|
|
175
175
|
}, {
|
|
176
176
|
singlePerResource: true,
|
|
@@ -195,7 +195,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
195
195
|
super();
|
|
196
196
|
this._store.add(slashCommandService.registerSlashCommand({
|
|
197
197
|
command: 'clear',
|
|
198
|
-
detail: ( localize(
|
|
198
|
+
detail: ( localize(3209, "Start a new chat")),
|
|
199
199
|
sortText: 'z2_clear',
|
|
200
200
|
executeImmediately: true,
|
|
201
201
|
locations: [ChatAgentLocation.Panel]
|
|
@@ -244,7 +244,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
244
244
|
}
|
|
245
245
|
const variables = [
|
|
246
246
|
...chatVariablesService.getVariables(ChatAgentLocation.Panel),
|
|
247
|
-
{ name: 'file', description: ( localize(
|
|
247
|
+
{ name: 'file', description: ( localize(3210, "Choose a file in the workspace")) }
|
|
248
248
|
];
|
|
249
249
|
const variableText = ( (variables
|
|
250
250
|
.map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`)))
|
package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.js
CHANGED
|
@@ -197,7 +197,7 @@ let ChatEditingModifiedFileEntry = class ChatEditingModifiedFileEntry extends Di
|
|
|
197
197
|
if (this._isFirstEditAfterStartOrSnapshot) {
|
|
198
198
|
this._isFirstEditAfterStartOrSnapshot = false;
|
|
199
199
|
const request = this._chatService.getSession(this._telemetryInfo.sessionId)?.getRequests().at(-1);
|
|
200
|
-
const label = request?.message.text ? ( localize(
|
|
200
|
+
const label = request?.message.text ? ( localize(10885, "Chat Edit: '{0}'", request.message.text)) : ( localize(10886, "Chat Edit"));
|
|
201
201
|
this._undoRedoService.pushElement(( (new SingleModelEditStackElement(label, 'chat.edit', this.doc, null))));
|
|
202
202
|
}
|
|
203
203
|
this._applyEdits(( (textEdits.map(TextEdit.asEditOperation))));
|
|
@@ -117,6 +117,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
117
117
|
}));
|
|
118
118
|
this._register(this._chatService.onDidDisposeSession((e) => {
|
|
119
119
|
if (e.reason === 'cleared' && this._currentSessionObs.get()?.chatSessionId === e.sessionId) {
|
|
120
|
+
this._applyingChatEditsFailedContextKey.set(false);
|
|
120
121
|
void this._currentSessionObs.get()?.stop();
|
|
121
122
|
}
|
|
122
123
|
}));
|
|
@@ -166,7 +167,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
166
167
|
this._currentSessionDisposables.add(this.installAutoApplyObserver(chatSessionId));
|
|
167
168
|
const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
|
|
168
169
|
multiDiffSource: ChatEditingMultiDiffSourceResolver.getMultiDiffSourceUri(),
|
|
169
|
-
label: ( localize(
|
|
170
|
+
label: ( localize(3216, "Suggested Edits"))
|
|
170
171
|
}, this._instantiationService);
|
|
171
172
|
const editorPane = options?.silent ? undefined : await this._editorGroupsService.activeGroup.openEditor(input, { pinned: true, activation: EditorActivation.ACTIVATE });
|
|
172
173
|
const session = this._instantiationService.createInstance(ChatEditingSession, chatSessionId, editorPane, this._editingSessionFileLimitPromise);
|
|
@@ -315,7 +316,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
315
316
|
else {
|
|
316
317
|
await this._progressService.withProgress({
|
|
317
318
|
location: 10 ,
|
|
318
|
-
title: ( localize2(
|
|
319
|
+
title: ( localize2(3217, 'Generating edits...')).value,
|
|
319
320
|
}, async () => {
|
|
320
321
|
await builder(stream, cancellationTokenSource.token);
|
|
321
322
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -366,7 +367,7 @@ class ChatDecorationsProvider extends Disposable {
|
|
|
366
367
|
constructor(_session) {
|
|
367
368
|
super();
|
|
368
369
|
this._session = _session;
|
|
369
|
-
this.label = ( localize(
|
|
370
|
+
this.label = ( localize(3218, "Chat Editing"));
|
|
370
371
|
this._currentlyEditingUris = derived(this, (r) => {
|
|
371
372
|
const session = this._session.read(r);
|
|
372
373
|
if (!session) {
|
|
@@ -315,7 +315,7 @@ let ChatEditingSession = class ChatEditingSession extends Disposable {
|
|
|
315
315
|
}
|
|
316
316
|
const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
|
|
317
317
|
multiDiffSource: ChatEditingMultiDiffSourceResolver.getMultiDiffSourceUri(),
|
|
318
|
-
label: ( localize(
|
|
318
|
+
label: ( localize(7701, "Suggested Edits"))
|
|
319
319
|
}, this._instantiationService);
|
|
320
320
|
const editorPane = await this._editorGroupsService.activeGroup.openEditor(input, { pinned: true, activation: EditorActivation.ACTIVATE });
|
|
321
321
|
this.editorPane = editorPane;
|
|
@@ -416,7 +416,7 @@ let ChatEditingSession = class ChatEditingSession extends Disposable {
|
|
|
416
416
|
}
|
|
417
417
|
if (resource.scheme !== Schemas.untitled && !this._workspaceContextService.getWorkspaceFolder(resource) && !(await this._fileService.exists(resource))) {
|
|
418
418
|
const saveLocation = await this._dialogService.showSaveDialog({ title: ( localize(
|
|
419
|
-
|
|
419
|
+
7702,
|
|
420
420
|
'{0} wants to create a file. Choose where it should be saved.',
|
|
421
421
|
this._chatAgentService.getDefaultAgent(ChatAgentLocation.EditingSession)?.fullName ?? 'Chat'
|
|
422
422
|
)) });
|
|
@@ -16,8 +16,8 @@ class NavigateAction extends Action2 {
|
|
|
16
16
|
? 'chatEditor.action.navigateNext'
|
|
17
17
|
: 'chatEditor.action.navigatePrevious',
|
|
18
18
|
title: next
|
|
19
|
-
? ( localize2(
|
|
20
|
-
: ( localize2(
|
|
19
|
+
? ( localize2(7624, 'Go to Next Chat Edit'))
|
|
20
|
+
: ( localize2(7625, 'Go to Previous Chat Edit')),
|
|
21
21
|
category: CHAT_CATEGORY,
|
|
22
22
|
icon: next ? Codicon.arrowDown : Codicon.arrowUp,
|
|
23
23
|
keybinding: {
|
|
@@ -57,8 +57,8 @@ class AcceptDiscardAction extends Action2 {
|
|
|
57
57
|
? 'chatEditor.action.accept'
|
|
58
58
|
: 'chatEditor.action.reject',
|
|
59
59
|
title: accept
|
|
60
|
-
? ( localize2(
|
|
61
|
-
: ( localize2(
|
|
60
|
+
? ( localize2(7626, 'Accept Chat Edit'))
|
|
61
|
+
: ( localize2(7627, 'Reject Chat Edit')),
|
|
62
62
|
category: CHAT_CATEGORY,
|
|
63
63
|
icon: accept
|
|
64
64
|
? Codicon.check
|
|
@@ -21,7 +21,7 @@ import { overviewRulerModifiedForeground, minimapGutterModifiedBackground, overv
|
|
|
21
21
|
import { IChatEditingService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
22
22
|
|
|
23
23
|
var ChatEditorController_1;
|
|
24
|
-
const ctxHasEditorModification = ( (new RawContextKey('chat.hasEditorModifications', undefined, ( localize(
|
|
24
|
+
const ctxHasEditorModification = ( (new RawContextKey('chat.hasEditorModifications', undefined, ( localize(7628, "The current editor contains chat modifications")))));
|
|
25
25
|
let ChatEditorController = class ChatEditorController extends Disposable {
|
|
26
26
|
static { ChatEditorController_1 = this; }
|
|
27
27
|
static { this.ID = 'editor.contrib.chatEditorController'; }
|
|
@@ -220,13 +220,16 @@ let ChatEditorController = class ChatEditorController extends Disposable {
|
|
|
220
220
|
const domNode = document.createElement('div');
|
|
221
221
|
domNode.className = 'chat-editing-original-zone view-lines line-delete monaco-mouse-cursor-text';
|
|
222
222
|
const result = renderLines(source, renderOptions, decorations, domNode);
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
223
|
+
const isCreatedContent = decorations.length === 1 && decorations[0].range.isEmpty() && decorations[0].range.startLineNumber === 1;
|
|
224
|
+
if (!isCreatedContent) {
|
|
225
|
+
const viewZoneData = {
|
|
226
|
+
afterLineNumber: diffEntry.modified.startLineNumber - 1,
|
|
227
|
+
heightInLines: result.heightInLines,
|
|
228
|
+
domNode,
|
|
229
|
+
ordinal: 50000 + 2
|
|
230
|
+
};
|
|
231
|
+
this._viewZones.push(viewZoneChangeAccessor.addZone(viewZoneData));
|
|
232
|
+
}
|
|
230
233
|
}
|
|
231
234
|
this._decorations.set(modifiedDecorations);
|
|
232
235
|
});
|
|
@@ -27,7 +27,7 @@ import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane, CHAT_EDITING_SIDEBAR_PANEL_ID } fr
|
|
|
27
27
|
const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
28
28
|
extensionPoint: 'chatParticipants',
|
|
29
29
|
jsonSchema: {
|
|
30
|
-
description: ( localize(
|
|
30
|
+
description: ( localize(7646, 'Contributes a chat participant')),
|
|
31
31
|
type: 'array',
|
|
32
32
|
items: {
|
|
33
33
|
additionalProperties: false,
|
|
@@ -36,12 +36,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
36
36
|
required: ['name', 'id'],
|
|
37
37
|
properties: {
|
|
38
38
|
id: {
|
|
39
|
-
description: ( localize(
|
|
39
|
+
description: ( localize(7647, "A unique id for this chat participant.")),
|
|
40
40
|
type: 'string'
|
|
41
41
|
},
|
|
42
42
|
name: {
|
|
43
43
|
description: ( localize(
|
|
44
|
-
|
|
44
|
+
7648,
|
|
45
45
|
"User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
|
|
46
46
|
)),
|
|
47
47
|
type: 'string',
|
|
@@ -49,37 +49,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
49
49
|
},
|
|
50
50
|
fullName: {
|
|
51
51
|
markdownDescription: ( localize(
|
|
52
|
-
|
|
52
|
+
7649,
|
|
53
53
|
"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.",
|
|
54
54
|
'`name`'
|
|
55
55
|
)),
|
|
56
56
|
type: 'string'
|
|
57
57
|
},
|
|
58
58
|
description: {
|
|
59
|
-
description: ( localize(
|
|
59
|
+
description: ( localize(7650, "A description of this chat participant, shown in the UI.")),
|
|
60
60
|
type: 'string'
|
|
61
61
|
},
|
|
62
62
|
isSticky: {
|
|
63
63
|
description: ( localize(
|
|
64
|
-
|
|
64
|
+
7651,
|
|
65
65
|
"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."
|
|
66
66
|
)),
|
|
67
67
|
type: 'boolean'
|
|
68
68
|
},
|
|
69
69
|
sampleRequest: {
|
|
70
70
|
description: ( localize(
|
|
71
|
-
|
|
71
|
+
7652,
|
|
72
72
|
"When the user clicks this participant in `/help`, this text will be submitted to the participant."
|
|
73
73
|
)),
|
|
74
74
|
type: 'string'
|
|
75
75
|
},
|
|
76
76
|
when: {
|
|
77
|
-
description: ( localize(
|
|
77
|
+
description: ( localize(7653, "A condition which must be true to enable this participant.")),
|
|
78
78
|
type: 'string'
|
|
79
79
|
},
|
|
80
80
|
disambiguation: {
|
|
81
81
|
description: ( localize(
|
|
82
|
-
|
|
82
|
+
7654,
|
|
83
83
|
"Metadata to help with automatically routing user questions to this chat participant."
|
|
84
84
|
)),
|
|
85
85
|
type: 'array',
|
|
@@ -91,21 +91,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
91
91
|
properties: {
|
|
92
92
|
category: {
|
|
93
93
|
markdownDescription: ( localize(
|
|
94
|
-
|
|
94
|
+
7655,
|
|
95
95
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
96
96
|
)),
|
|
97
97
|
type: 'string'
|
|
98
98
|
},
|
|
99
99
|
description: {
|
|
100
100
|
description: ( localize(
|
|
101
|
-
|
|
101
|
+
7656,
|
|
102
102
|
"A detailed description of the kinds of questions that are suitable for this chat participant."
|
|
103
103
|
)),
|
|
104
104
|
type: 'string'
|
|
105
105
|
},
|
|
106
106
|
examples: {
|
|
107
107
|
description: ( localize(
|
|
108
|
-
|
|
108
|
+
7657,
|
|
109
109
|
"A list of representative example questions that are suitable for this chat participant."
|
|
110
110
|
)),
|
|
111
111
|
type: 'array'
|
|
@@ -115,7 +115,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
115
115
|
},
|
|
116
116
|
commands: {
|
|
117
117
|
markdownDescription: ( localize(
|
|
118
|
-
|
|
118
|
+
7658,
|
|
119
119
|
"Commands available for this chat participant, which the user can invoke with a `/`."
|
|
120
120
|
)),
|
|
121
121
|
type: 'array',
|
|
@@ -127,36 +127,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
127
127
|
properties: {
|
|
128
128
|
name: {
|
|
129
129
|
description: ( localize(
|
|
130
|
-
|
|
130
|
+
7659,
|
|
131
131
|
"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."
|
|
132
132
|
)),
|
|
133
133
|
type: 'string'
|
|
134
134
|
},
|
|
135
135
|
description: {
|
|
136
|
-
description: ( localize(
|
|
136
|
+
description: ( localize(7660, "A description of this command.")),
|
|
137
137
|
type: 'string'
|
|
138
138
|
},
|
|
139
139
|
when: {
|
|
140
|
-
description: ( localize(
|
|
140
|
+
description: ( localize(7661, "A condition which must be true to enable this command.")),
|
|
141
141
|
type: 'string'
|
|
142
142
|
},
|
|
143
143
|
sampleRequest: {
|
|
144
144
|
description: ( localize(
|
|
145
|
-
|
|
145
|
+
7662,
|
|
146
146
|
"When the user clicks this command in `/help`, this text will be submitted to the participant."
|
|
147
147
|
)),
|
|
148
148
|
type: 'string'
|
|
149
149
|
},
|
|
150
150
|
isSticky: {
|
|
151
151
|
description: ( localize(
|
|
152
|
-
|
|
152
|
+
7651,
|
|
153
153
|
"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."
|
|
154
154
|
)),
|
|
155
155
|
type: 'boolean'
|
|
156
156
|
},
|
|
157
157
|
disambiguation: {
|
|
158
158
|
description: ( localize(
|
|
159
|
-
|
|
159
|
+
7663,
|
|
160
160
|
"Metadata to help with automatically routing user questions to this chat command."
|
|
161
161
|
)),
|
|
162
162
|
type: 'array',
|
|
@@ -168,21 +168,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
168
168
|
properties: {
|
|
169
169
|
category: {
|
|
170
170
|
markdownDescription: ( localize(
|
|
171
|
-
|
|
171
|
+
7664,
|
|
172
172
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
173
173
|
)),
|
|
174
174
|
type: 'string'
|
|
175
175
|
},
|
|
176
176
|
description: {
|
|
177
177
|
description: ( localize(
|
|
178
|
-
|
|
178
|
+
7665,
|
|
179
179
|
"A detailed description of the kinds of questions that are suitable for this chat command."
|
|
180
180
|
)),
|
|
181
181
|
type: 'string'
|
|
182
182
|
},
|
|
183
183
|
examples: {
|
|
184
184
|
description: ( localize(
|
|
185
|
-
|
|
185
|
+
7666,
|
|
186
186
|
"A list of representative example questions that are suitable for this chat command."
|
|
187
187
|
)),
|
|
188
188
|
type: 'array'
|
|
@@ -294,7 +294,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
294
294
|
});
|
|
295
295
|
}
|
|
296
296
|
registerViewContainer() {
|
|
297
|
-
const title = ( localize2(
|
|
297
|
+
const title = ( localize2(7667, "Chat"));
|
|
298
298
|
const icon = Codicon.commentDiscussion;
|
|
299
299
|
const viewContainerId = CHAT_SIDEBAR_PANEL_ID;
|
|
300
300
|
const viewContainer = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
|
|
@@ -340,7 +340,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
registerChatEditingView() {
|
|
343
|
-
const title = ( localize2(
|
|
343
|
+
const title = ( localize2(7668, "Copilot Edits"));
|
|
344
344
|
const icon = Codicon.editSession;
|
|
345
345
|
const viewContainerId = CHAT_EDITING_SIDEBAR_PANEL_ID;
|
|
346
346
|
const viewContainer = ( (Registry.as(Extensions.ViewContainersRegistry))).registerViewContainer({
|
|
@@ -405,9 +405,9 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
|
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
this.registeredWelcomeView = true;
|
|
408
|
-
const showExtensionLabel = ( localize(
|
|
408
|
+
const showExtensionLabel = ( localize(7669, "Show Extension"));
|
|
409
409
|
const mainMessage = ( localize(
|
|
410
|
-
|
|
410
|
+
7670,
|
|
411
411
|
"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.",
|
|
412
412
|
'GitHub Copilot Chat',
|
|
413
413
|
this.productService.nameLong
|
|
@@ -49,7 +49,7 @@ class PasteImageProvider {
|
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
51
|
const attachedVariables = widget.attachmentModel.attachments;
|
|
52
|
-
const displayName = ( localize(
|
|
52
|
+
const displayName = ( localize(7671, 'Pasted Image'));
|
|
53
53
|
let tempDisplayName = displayName;
|
|
54
54
|
for (let appendValue = 2; ( (attachedVariables.some(attachment => attachment.name === tempDisplayName))); appendValue++) {
|
|
55
55
|
tempDisplayName = `${displayName} ${appendValue}`;
|
|
@@ -61,7 +61,7 @@ let ChatAgentHoverParticipant = class ChatAgentHoverParticipant {
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
getAccessibleContent(hoverPart) {
|
|
64
|
-
return ( localize(
|
|
64
|
+
return ( localize(7674, 'There is a chat agent hover part here.'));
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
ChatAgentHoverParticipant = ( (__decorate([
|
|
@@ -105,7 +105,7 @@ let LanguageModelToolsService = class LanguageModelToolsService extends Disposab
|
|
|
105
105
|
const prepared = tool.impl.prepareToolInvocation ?
|
|
106
106
|
await tool.impl.prepareToolInvocation(dto.parameters, token)
|
|
107
107
|
: undefined;
|
|
108
|
-
const defaultMessage = ( localize(
|
|
108
|
+
const defaultMessage = ( localize(3215, "Using {0}", `"${tool.data.displayName}"`));
|
|
109
109
|
const invocationMessage = prepared?.invocationMessage ?? defaultMessage;
|
|
110
110
|
toolInvocation = ( (new ChatToolInvocation(invocationMessage, prepared?.confirmationMessages)));
|
|
111
111
|
token.onCancellationRequested(() => {
|
package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeContributions.js
CHANGED
|
@@ -11,7 +11,7 @@ import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensio
|
|
|
11
11
|
const chatViewsWelcomeExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
12
12
|
extensionPoint: 'chatViewsWelcome',
|
|
13
13
|
jsonSchema: {
|
|
14
|
-
description: ( localize(
|
|
14
|
+
description: ( localize(7675, 'Contributes a welcome message to a chat view')),
|
|
15
15
|
type: 'array',
|
|
16
16
|
items: {
|
|
17
17
|
additionalProperties: false,
|
|
@@ -19,22 +19,22 @@ const chatViewsWelcomeExtensionPoint = ExtensionsRegistry.registerExtensionPoint
|
|
|
19
19
|
properties: {
|
|
20
20
|
icon: {
|
|
21
21
|
type: 'string',
|
|
22
|
-
description: ( localize(
|
|
22
|
+
description: ( localize(7676, 'The icon for the welcome message.')),
|
|
23
23
|
},
|
|
24
24
|
title: {
|
|
25
25
|
type: 'string',
|
|
26
|
-
description: ( localize(
|
|
26
|
+
description: ( localize(7677, 'The title of the welcome message.')),
|
|
27
27
|
},
|
|
28
28
|
content: {
|
|
29
29
|
type: 'string',
|
|
30
30
|
description: ( localize(
|
|
31
|
-
|
|
31
|
+
7678,
|
|
32
32
|
'The content of the welcome message. The first command link will be rendered as a button.'
|
|
33
33
|
)),
|
|
34
34
|
},
|
|
35
35
|
when: {
|
|
36
36
|
type: 'string',
|
|
37
|
-
description: ( localize(
|
|
37
|
+
description: ( localize(7679, 'Condition when the welcome message is shown.')),
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
},
|
|
@@ -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 && session.initialLocation !== ChatAgentLocation.EditingSession)
|
|
248
248
|
.map(session => {
|
|
249
|
-
const title = session.title || ( localize(
|
|
249
|
+
const title = session.title || ( localize(3180, "New Chat"));
|
|
250
250
|
return {
|
|
251
251
|
sessionId: session.sessionId,
|
|
252
252
|
title,
|
|
@@ -546,7 +546,7 @@ let ChatService = class ChatService extends Disposable {
|
|
|
546
546
|
else {
|
|
547
547
|
if (!rawResult) {
|
|
548
548
|
this.trace('sendRequest', `Provider returned no response for session ${model.sessionId}`);
|
|
549
|
-
rawResult = { errorDetails: { message: ( localize(
|
|
549
|
+
rawResult = { errorDetails: { message: ( localize(3181, "Provider returned null response")) } };
|
|
550
550
|
}
|
|
551
551
|
const result = rawResult.errorDetails?.responseIsFiltered ? 'filtered' :
|
|
552
552
|
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(3194, "Language Models")),
|
|
124
|
+
description: ( localize(3195, "Language models usage statistics of this extension.")),
|
|
125
125
|
access: {
|
|
126
126
|
canToggle: false
|
|
127
127
|
},
|
|
@@ -17,14 +17,14 @@ const languageModelType = {
|
|
|
17
17
|
properties: {
|
|
18
18
|
vendor: {
|
|
19
19
|
type: 'string',
|
|
20
|
-
description: ( localize(
|
|
20
|
+
description: ( localize(3182, "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(3183, "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(3184, "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
|
+
3185,
|
|
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(3186, "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(3187, "The vendor field cannot start or end with whitespace.")));
|
|
75
75
|
continue;
|
|
76
76
|
}
|
|
77
77
|
this._vendors.add(item.vendor);
|