@codingame/monaco-vscode-chat-service-override 13.0.0 → 13.1.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 +20 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.js +20 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatClearActions.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatCodeblockActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContextActions.js +20 -20
- 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 +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingService.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatParticipant.contribution.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/chatPasteProviders.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSetup.js +29 -29
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputEditorHover.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatInputRelatedFilesContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/languageModelToolsService.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewsWelcomeHandler.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.js +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 +8 -8
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSavingServiceImpl.js +6 -6
|
@@ -20,7 +20,7 @@ function registerQuickChatActions() {
|
|
|
20
20
|
constructor() {
|
|
21
21
|
super({
|
|
22
22
|
id: 'workbench.action.quickchat.openInChatView',
|
|
23
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(4256, "Open in Chat View")),
|
|
24
24
|
f1: false,
|
|
25
25
|
category: CHAT_CATEGORY,
|
|
26
26
|
icon: Codicon.commentDiscussion,
|
|
@@ -40,7 +40,7 @@ function registerQuickChatActions() {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
super({
|
|
42
42
|
id: 'workbench.action.quickchat.close',
|
|
43
|
-
title: ( localize2(
|
|
43
|
+
title: ( localize2(4257, "Close Quick Chat")),
|
|
44
44
|
f1: false,
|
|
45
45
|
category: CHAT_CATEGORY,
|
|
46
46
|
icon: Codicon.close,
|
|
@@ -60,7 +60,7 @@ function registerQuickChatActions() {
|
|
|
60
60
|
constructor() {
|
|
61
61
|
super({
|
|
62
62
|
id: 'workbench.action.quickchat.launchInlineChat',
|
|
63
|
-
title: ( localize2(
|
|
63
|
+
title: ( localize2(4258, "Launch Inline Chat")),
|
|
64
64
|
f1: false,
|
|
65
65
|
category: CHAT_CATEGORY
|
|
66
66
|
});
|
|
@@ -88,7 +88,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
88
88
|
constructor() {
|
|
89
89
|
super({
|
|
90
90
|
id: ASK_QUICK_QUESTION_ACTION_ID,
|
|
91
|
-
title: ( localize2(
|
|
91
|
+
title: ( localize2(4259, 'Quick Chat')),
|
|
92
92
|
precondition: ChatContextKeys.enabled,
|
|
93
93
|
icon: Codicon.commentDiscussion,
|
|
94
94
|
f1: false,
|
|
@@ -103,7 +103,7 @@ class QuickChatGlobalAction extends Action2 {
|
|
|
103
103
|
order: 5
|
|
104
104
|
},
|
|
105
105
|
metadata: {
|
|
106
|
-
description: ( localize(
|
|
106
|
+
description: ( localize(4260, '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(4261, "The query to open the quick chat with")),
|
|
117
117
|
type: 'string'
|
|
118
118
|
},
|
|
119
119
|
isPartialQuery: {
|
|
120
|
-
description: ( localize(
|
|
120
|
+
description: ( localize(4262, "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(4261, "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(4263, "Open Quick Chat")),
|
|
158
158
|
f1: true
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -51,7 +51,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
this.notify(( localize(
|
|
54
|
-
|
|
54
|
+
4280,
|
|
55
55
|
"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."
|
|
56
56
|
)));
|
|
57
57
|
}
|
|
@@ -64,7 +64,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
64
64
|
}
|
|
65
65
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
66
66
|
if (notebookEditor.isReadOnly) {
|
|
67
|
-
this.notify(( localize(
|
|
67
|
+
this.notify(( localize(4281, "Cannot insert the code block to read-only notebook editor.")));
|
|
68
68
|
return false;
|
|
69
69
|
}
|
|
70
70
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -75,7 +75,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
75
75
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
76
76
|
const activeModel = codeEditor.getModel();
|
|
77
77
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
78
|
-
this.notify(( localize(
|
|
78
|
+
this.notify(( localize(4282, "Cannot insert the code block to read-only code editor.")));
|
|
79
79
|
return false;
|
|
80
80
|
}
|
|
81
81
|
const range = codeEditor.getSelection() ?? ( new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1));
|
|
@@ -115,7 +115,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
115
115
|
async run(context) {
|
|
116
116
|
if (this.inlineChatPreview && this.inlineChatPreview.isOpen()) {
|
|
117
117
|
await this.dialogService.info(( localize(
|
|
118
|
-
|
|
118
|
+
4283,
|
|
119
119
|
"Another code change is being previewed. Please apply or discard the pending changes first."
|
|
120
120
|
)));
|
|
121
121
|
return;
|
|
@@ -146,7 +146,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
146
146
|
result = await this.handleNotebookEditor(activeNotebookEditor, context);
|
|
147
147
|
}
|
|
148
148
|
else {
|
|
149
|
-
this.notify(( localize(
|
|
149
|
+
this.notify(( localize(4284, "To apply this code block, open a code or notebook editor.")));
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
notifyUserAction(this.chatService, context, {
|
|
@@ -159,7 +159,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
159
159
|
}
|
|
160
160
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
161
161
|
if (notebookEditor.isReadOnly) {
|
|
162
|
-
this.notify(( localize(
|
|
162
|
+
this.notify(( localize(4285, "Cannot apply code block to read-only notebook editor.")));
|
|
163
163
|
return undefined;
|
|
164
164
|
}
|
|
165
165
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -169,7 +169,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
169
169
|
}
|
|
170
170
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
171
171
|
if (isReadOnly(codeEditor.getModel(), this.textFileService)) {
|
|
172
|
-
this.notify(( localize(
|
|
172
|
+
this.notify(( localize(4286, "Cannot apply code block to read-only file.")));
|
|
173
173
|
return undefined;
|
|
174
174
|
}
|
|
175
175
|
const result = await this.computeEdits(codeEditor, codeBlockContext);
|
|
@@ -196,7 +196,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
196
196
|
const result = await this.progressService.withProgress({ location: ProgressLocation.Notification, delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
197
197
|
for (const provider of mappedEditsProviders) {
|
|
198
198
|
codeMapper = provider.displayName;
|
|
199
|
-
progress.report({ message: ( localize(
|
|
199
|
+
progress.report({ message: ( localize(4287, "Applying code block using {0}...", codeMapper)) });
|
|
200
200
|
const mappedEdits = await provider.provideMappedEdits(activeModel, [codeBlockActionContext.code], {
|
|
201
201
|
documents: docRefs,
|
|
202
202
|
conversation: getChatConversation(codeBlockActionContext),
|
|
@@ -213,7 +213,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
213
213
|
}
|
|
214
214
|
catch (e) {
|
|
215
215
|
if (!isCancellationError(e)) {
|
|
216
|
-
this.notify(( localize(
|
|
216
|
+
this.notify(( localize(4288, "Failed to apply code block: {0}", e.message)));
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
finally {
|
|
@@ -84,34 +84,34 @@ import { ChatQuotasStatusBarEntry } from '@codingame/monaco-vscode-fab30422-b487
|
|
|
84
84
|
const configurationRegistry = ( Registry.as(Extensions.Configuration));
|
|
85
85
|
configurationRegistry.registerConfiguration({
|
|
86
86
|
id: 'chatSidebar',
|
|
87
|
-
title: ( localize(
|
|
87
|
+
title: ( localize(4295, "Chat")),
|
|
88
88
|
type: 'object',
|
|
89
89
|
properties: {
|
|
90
90
|
'chat.editor.fontSize': {
|
|
91
91
|
type: 'number',
|
|
92
|
-
description: ( localize(
|
|
92
|
+
description: ( localize(4296, "Controls the font size in pixels in chat codeblocks.")),
|
|
93
93
|
default: isMacintosh ? 12 : 14,
|
|
94
94
|
},
|
|
95
95
|
'chat.editor.fontFamily': {
|
|
96
96
|
type: 'string',
|
|
97
|
-
description: ( localize(
|
|
97
|
+
description: ( localize(4297, "Controls the font family in chat codeblocks.")),
|
|
98
98
|
default: 'default'
|
|
99
99
|
},
|
|
100
100
|
'chat.editor.fontWeight': {
|
|
101
101
|
type: 'string',
|
|
102
|
-
description: ( localize(
|
|
102
|
+
description: ( localize(4298, "Controls the font weight in chat codeblocks.")),
|
|
103
103
|
default: 'default'
|
|
104
104
|
},
|
|
105
105
|
'chat.editor.wordWrap': {
|
|
106
106
|
type: 'string',
|
|
107
|
-
description: ( localize(
|
|
107
|
+
description: ( localize(4299, "Controls whether lines should wrap in chat codeblocks.")),
|
|
108
108
|
default: 'off',
|
|
109
109
|
enum: ['on', 'off']
|
|
110
110
|
},
|
|
111
111
|
'chat.editor.lineHeight': {
|
|
112
112
|
type: 'number',
|
|
113
113
|
description: ( localize(
|
|
114
|
-
|
|
114
|
+
4300,
|
|
115
115
|
"Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."
|
|
116
116
|
)),
|
|
117
117
|
default: 0
|
|
@@ -120,7 +120,7 @@ configurationRegistry.registerConfiguration({
|
|
|
120
120
|
type: 'boolean',
|
|
121
121
|
tags: ['preview'],
|
|
122
122
|
markdownDescription: ( localize(
|
|
123
|
-
|
|
123
|
+
4301,
|
|
124
124
|
"Controls whether the command center shows a menu for actions to control Copilot (requires {0}).",
|
|
125
125
|
'`#window.commandCenter#`'
|
|
126
126
|
)),
|
|
@@ -130,14 +130,14 @@ configurationRegistry.registerConfiguration({
|
|
|
130
130
|
type: 'boolean',
|
|
131
131
|
default: isNative,
|
|
132
132
|
scope: ConfigurationScope.APPLICATION,
|
|
133
|
-
markdownDescription: ( localize(
|
|
133
|
+
markdownDescription: ( localize(4302, "Controls whether setup is offered for Chat if not done already.")),
|
|
134
134
|
tags: ['experimental', 'onExP']
|
|
135
135
|
},
|
|
136
136
|
'chat.editing.alwaysSaveWithGeneratedChanges': {
|
|
137
137
|
type: 'boolean',
|
|
138
138
|
scope: ConfigurationScope.APPLICATION,
|
|
139
139
|
markdownDescription: ( localize(
|
|
140
|
-
|
|
140
|
+
4303,
|
|
141
141
|
"Whether files that have changes made by chat can be saved without confirmation."
|
|
142
142
|
)),
|
|
143
143
|
default: false,
|
|
@@ -146,7 +146,7 @@ configurationRegistry.registerConfiguration({
|
|
|
146
146
|
type: 'boolean',
|
|
147
147
|
scope: ConfigurationScope.APPLICATION,
|
|
148
148
|
markdownDescription: ( localize(
|
|
149
|
-
|
|
149
|
+
4304,
|
|
150
150
|
"Whether to show a confirmation before removing a request and its associated edits."
|
|
151
151
|
)),
|
|
152
152
|
default: true,
|
|
@@ -155,7 +155,7 @@ configurationRegistry.registerConfiguration({
|
|
|
155
155
|
type: 'boolean',
|
|
156
156
|
scope: ConfigurationScope.APPLICATION,
|
|
157
157
|
markdownDescription: ( localize(
|
|
158
|
-
|
|
158
|
+
4305,
|
|
159
159
|
"Whether to show a confirmation before retrying a request and its associated edits."
|
|
160
160
|
)),
|
|
161
161
|
default: true,
|
|
@@ -163,20 +163,20 @@ configurationRegistry.registerConfiguration({
|
|
|
163
163
|
'chat.experimental.detectParticipant.enabled': {
|
|
164
164
|
type: 'boolean',
|
|
165
165
|
deprecationMessage: ( localize(
|
|
166
|
-
|
|
166
|
+
4306,
|
|
167
167
|
"This setting is deprecated. Please use `chat.detectParticipant.enabled` instead."
|
|
168
168
|
)),
|
|
169
|
-
description: ( localize(
|
|
169
|
+
description: ( localize(4307, "Enables chat participant autodetection for panel chat.")),
|
|
170
170
|
default: null
|
|
171
171
|
},
|
|
172
172
|
'chat.detectParticipant.enabled': {
|
|
173
173
|
type: 'boolean',
|
|
174
|
-
description: ( localize(
|
|
174
|
+
description: ( localize(4308, "Enables chat participant autodetection for panel chat.")),
|
|
175
175
|
default: true
|
|
176
176
|
},
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
|
-
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(
|
|
179
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ChatEditor, ChatEditorInput.EditorID, ( localize(4309, "Chat"))), [
|
|
180
180
|
( new SyncDescriptor(ChatEditorInput))
|
|
181
181
|
]);
|
|
182
182
|
( Registry.as(Extensions$1.ConfigurationMigration)).registerConfigurationMigrations([
|
|
@@ -194,7 +194,7 @@ let ChatResolverContribution = class ChatResolverContribution extends Disposable
|
|
|
194
194
|
super();
|
|
195
195
|
this._register(editorResolverService.registerEditor(`${Schemas.vscodeChatSesssion}:**/**`, {
|
|
196
196
|
id: ChatEditorInput.EditorID,
|
|
197
|
-
label: ( localize(
|
|
197
|
+
label: ( localize(4309, "Chat")),
|
|
198
198
|
priority: RegisteredEditorPriority.builtin
|
|
199
199
|
}, {
|
|
200
200
|
singlePerResource: true,
|
|
@@ -220,7 +220,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
220
220
|
super();
|
|
221
221
|
this._store.add(slashCommandService.registerSlashCommand({
|
|
222
222
|
command: 'clear',
|
|
223
|
-
detail: ( localize(
|
|
223
|
+
detail: ( localize(4310, "Start a new chat")),
|
|
224
224
|
sortText: 'z2_clear',
|
|
225
225
|
executeImmediately: true,
|
|
226
226
|
locations: [ChatAgentLocation.Panel]
|
|
@@ -269,7 +269,7 @@ let ChatSlashStaticSlashCommandsContribution = class ChatSlashStaticSlashCommand
|
|
|
269
269
|
}
|
|
270
270
|
const variables = [
|
|
271
271
|
...chatVariablesService.getVariables(ChatAgentLocation.Panel),
|
|
272
|
-
{ name: 'file', description: ( localize(
|
|
272
|
+
{ name: 'file', description: ( localize(4311, "Choose a file in the workspace")) }
|
|
273
273
|
];
|
|
274
274
|
const variableText = ( variables
|
|
275
275
|
.map(v => `* \`${chatVariableLeader}${v.name}\` - ${v.description}`))
|
|
@@ -128,7 +128,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
128
128
|
const session = this._currentSessionObs.get();
|
|
129
129
|
if (session) {
|
|
130
130
|
storageService.store(STORAGE_KEY_EDITING_SESSION, session.chatSessionId, StorageScope.WORKSPACE, StorageTarget.MACHINE);
|
|
131
|
-
e.join(session.storeState(), { id: 'join.chatEditingSession', label: ( localize(
|
|
131
|
+
e.join(session.storeState(), { id: 'join.chatEditingSession', label: ( localize(4399, "Saving chat edits history")) });
|
|
132
132
|
}
|
|
133
133
|
}));
|
|
134
134
|
this._editingSessionFileLimitPromise = this._workbenchAssignmentService.getTreatment(chatEditingMaxFileAssignmentName).then(value => {
|
|
@@ -300,7 +300,7 @@ let ChatEditingService = class ChatEditingService extends Disposable {
|
|
|
300
300
|
try {
|
|
301
301
|
await this._progressService.withProgress({
|
|
302
302
|
location: ProgressLocation.Window,
|
|
303
|
-
title: ( localize2(
|
|
303
|
+
title: ( localize2(4400, 'Generating edits...')).value,
|
|
304
304
|
}, async () => {
|
|
305
305
|
await builder(stream, cancellationTokenSource.token);
|
|
306
306
|
}, () => cancellationTokenSource.cancel());
|
|
@@ -375,7 +375,7 @@ let ChatDecorationsProvider = class ChatDecorationsProvider extends Disposable {
|
|
|
375
375
|
super();
|
|
376
376
|
this._session = _session;
|
|
377
377
|
this._chatAgentService = _chatAgentService;
|
|
378
|
-
this.label = ( localize(
|
|
378
|
+
this.label = ( localize(4401, "Chat Editing"));
|
|
379
379
|
this._currentEntries = derived(this, (r) => {
|
|
380
380
|
const session = this._session.read(r);
|
|
381
381
|
if (!session) {
|
|
@@ -412,7 +412,7 @@ let ChatDecorationsProvider = class ChatDecorationsProvider extends Disposable {
|
|
|
412
412
|
return {
|
|
413
413
|
weight: 1000,
|
|
414
414
|
letter: Codicon.diffModified,
|
|
415
|
-
tooltip: defaultAgentName ? ( localize(
|
|
415
|
+
tooltip: defaultAgentName ? ( localize(4402, "Pending changes from {0}", defaultAgentName)) : ( localize(4403, "Pending changes from chat")),
|
|
416
416
|
bubble: true
|
|
417
417
|
};
|
|
418
418
|
}
|
|
@@ -234,7 +234,7 @@ let ChatEditingSession = class ChatEditingSession extends Disposable {
|
|
|
234
234
|
didChange = this._workingSet.delete(entry) || didChange;
|
|
235
235
|
}
|
|
236
236
|
for (const entry of activeEditors) {
|
|
237
|
-
this._workingSet.set(entry, { state: WorkingSetEntryState.Transient, description: ( localize(
|
|
237
|
+
this._workingSet.set(entry, { state: WorkingSetEntryState.Transient, description: ( localize(4404, "Open Editor")) });
|
|
238
238
|
didChange = true;
|
|
239
239
|
}
|
|
240
240
|
if (didChange) {
|
|
@@ -404,7 +404,7 @@ let ChatEditingSession = class ChatEditingSession extends Disposable {
|
|
|
404
404
|
}
|
|
405
405
|
const input = MultiDiffEditorInput.fromResourceMultiDiffEditorInput({
|
|
406
406
|
multiDiffSource: ChatEditingMultiDiffSourceResolver.getMultiDiffSourceUri(),
|
|
407
|
-
label: ( localize(
|
|
407
|
+
label: ( localize(4405, "Suggested Edits"))
|
|
408
408
|
}, this._instantiationService);
|
|
409
409
|
this._editorPane = await this._editorGroupsService.activeGroup.openEditor(input, { pinned: true, activation: EditorActivation.ACTIVATE });
|
|
410
410
|
}
|
|
@@ -523,7 +523,7 @@ let ChatEditingSession = class ChatEditingSession extends Disposable {
|
|
|
523
523
|
}
|
|
524
524
|
if (resource.scheme !== Schemas.untitled && !this._workspaceContextService.getWorkspaceFolder(resource) && !(await this._fileService.exists(resource))) {
|
|
525
525
|
const saveLocation = await this._dialogService.showSaveDialog({ title: ( localize(
|
|
526
|
-
|
|
526
|
+
4406,
|
|
527
527
|
'{0} wants to create a file. Choose where it should be saved.',
|
|
528
528
|
this._chatAgentService.getDefaultAgent(ChatAgentLocation.EditingSession)?.fullName ?? 'Chat'
|
|
529
529
|
)) });
|
|
@@ -648,11 +648,11 @@ let ChatEditingSessionStorage = class ChatEditingSessionStorage {
|
|
|
648
648
|
const entry = await deserializeSnapshotEntry(entryDTO);
|
|
649
649
|
entriesMap.set(entry.resource, entry);
|
|
650
650
|
}
|
|
651
|
-
return
|
|
651
|
+
return {
|
|
652
652
|
requestId: snapshot.requestId,
|
|
653
653
|
workingSet: deserializeResourceMap(snapshot.workingSet, (value) => value, ( new ResourceMap())),
|
|
654
654
|
entries: entriesMap
|
|
655
|
-
}
|
|
655
|
+
};
|
|
656
656
|
};
|
|
657
657
|
const deserializeSnapshotEntry = async (entry) => {
|
|
658
658
|
return {
|
|
@@ -735,11 +735,11 @@ let ChatEditingSessionStorage = class ChatEditingSessionStorage {
|
|
|
735
735
|
return ( Array.from(resourceMap.entries()).map(([resourceURI, value]) => [( resourceURI.toString()), serialize(value)]));
|
|
736
736
|
};
|
|
737
737
|
const serializeChatEditingSessionSnapshot = (snapshot) => {
|
|
738
|
-
return
|
|
738
|
+
return {
|
|
739
739
|
requestId: snapshot.requestId,
|
|
740
740
|
workingSet: serializeResourceMap(snapshot.workingSet, value => value),
|
|
741
741
|
entries: ( Array.from(( snapshot.entries.values())).map(serializeSnapshotEntry))
|
|
742
|
-
}
|
|
742
|
+
};
|
|
743
743
|
};
|
|
744
744
|
const serializeSnapshotEntry = (entry) => {
|
|
745
745
|
return {
|
|
@@ -30,7 +30,7 @@ import { CHAT_SIDEBAR_PANEL_ID, ChatViewPane, CHAT_EDITING_SIDEBAR_PANEL_ID } fr
|
|
|
30
30
|
const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint({
|
|
31
31
|
extensionPoint: 'chatParticipants',
|
|
32
32
|
jsonSchema: {
|
|
33
|
-
description: ( localize(
|
|
33
|
+
description: ( localize(4490, 'Contributes a chat participant')),
|
|
34
34
|
type: 'array',
|
|
35
35
|
items: {
|
|
36
36
|
additionalProperties: false,
|
|
@@ -39,12 +39,12 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
39
39
|
required: ['name', 'id'],
|
|
40
40
|
properties: {
|
|
41
41
|
id: {
|
|
42
|
-
description: ( localize(
|
|
42
|
+
description: ( localize(4491, "A unique id for this chat participant.")),
|
|
43
43
|
type: 'string'
|
|
44
44
|
},
|
|
45
45
|
name: {
|
|
46
46
|
description: ( localize(
|
|
47
|
-
|
|
47
|
+
4492,
|
|
48
48
|
"User-facing name for this chat participant. The user will use '@' with this name to invoke the participant. Name must not contain whitespace."
|
|
49
49
|
)),
|
|
50
50
|
type: 'string',
|
|
@@ -52,37 +52,37 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
52
52
|
},
|
|
53
53
|
fullName: {
|
|
54
54
|
markdownDescription: ( localize(
|
|
55
|
-
|
|
55
|
+
4493,
|
|
56
56
|
"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.",
|
|
57
57
|
'`name`'
|
|
58
58
|
)),
|
|
59
59
|
type: 'string'
|
|
60
60
|
},
|
|
61
61
|
description: {
|
|
62
|
-
description: ( localize(
|
|
62
|
+
description: ( localize(4494, "A description of this chat participant, shown in the UI.")),
|
|
63
63
|
type: 'string'
|
|
64
64
|
},
|
|
65
65
|
isSticky: {
|
|
66
66
|
description: ( localize(
|
|
67
|
-
|
|
67
|
+
4495,
|
|
68
68
|
"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."
|
|
69
69
|
)),
|
|
70
70
|
type: 'boolean'
|
|
71
71
|
},
|
|
72
72
|
sampleRequest: {
|
|
73
73
|
description: ( localize(
|
|
74
|
-
|
|
74
|
+
4496,
|
|
75
75
|
"When the user clicks this participant in `/help`, this text will be submitted to the participant."
|
|
76
76
|
)),
|
|
77
77
|
type: 'string'
|
|
78
78
|
},
|
|
79
79
|
when: {
|
|
80
|
-
description: ( localize(
|
|
80
|
+
description: ( localize(4497, "A condition which must be true to enable this participant.")),
|
|
81
81
|
type: 'string'
|
|
82
82
|
},
|
|
83
83
|
disambiguation: {
|
|
84
84
|
description: ( localize(
|
|
85
|
-
|
|
85
|
+
4498,
|
|
86
86
|
"Metadata to help with automatically routing user questions to this chat participant."
|
|
87
87
|
)),
|
|
88
88
|
type: 'array',
|
|
@@ -94,21 +94,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
94
94
|
properties: {
|
|
95
95
|
category: {
|
|
96
96
|
markdownDescription: ( localize(
|
|
97
|
-
|
|
97
|
+
4499,
|
|
98
98
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
99
99
|
)),
|
|
100
100
|
type: 'string'
|
|
101
101
|
},
|
|
102
102
|
description: {
|
|
103
103
|
description: ( localize(
|
|
104
|
-
|
|
104
|
+
4500,
|
|
105
105
|
"A detailed description of the kinds of questions that are suitable for this chat participant."
|
|
106
106
|
)),
|
|
107
107
|
type: 'string'
|
|
108
108
|
},
|
|
109
109
|
examples: {
|
|
110
110
|
description: ( localize(
|
|
111
|
-
|
|
111
|
+
4501,
|
|
112
112
|
"A list of representative example questions that are suitable for this chat participant."
|
|
113
113
|
)),
|
|
114
114
|
type: 'array'
|
|
@@ -118,7 +118,7 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
118
118
|
},
|
|
119
119
|
commands: {
|
|
120
120
|
markdownDescription: ( localize(
|
|
121
|
-
|
|
121
|
+
4502,
|
|
122
122
|
"Commands available for this chat participant, which the user can invoke with a `/`."
|
|
123
123
|
)),
|
|
124
124
|
type: 'array',
|
|
@@ -130,36 +130,36 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
130
130
|
properties: {
|
|
131
131
|
name: {
|
|
132
132
|
description: ( localize(
|
|
133
|
-
|
|
133
|
+
4503,
|
|
134
134
|
"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."
|
|
135
135
|
)),
|
|
136
136
|
type: 'string'
|
|
137
137
|
},
|
|
138
138
|
description: {
|
|
139
|
-
description: ( localize(
|
|
139
|
+
description: ( localize(4504, "A description of this command.")),
|
|
140
140
|
type: 'string'
|
|
141
141
|
},
|
|
142
142
|
when: {
|
|
143
|
-
description: ( localize(
|
|
143
|
+
description: ( localize(4505, "A condition which must be true to enable this command.")),
|
|
144
144
|
type: 'string'
|
|
145
145
|
},
|
|
146
146
|
sampleRequest: {
|
|
147
147
|
description: ( localize(
|
|
148
|
-
|
|
148
|
+
4506,
|
|
149
149
|
"When the user clicks this command in `/help`, this text will be submitted to the participant."
|
|
150
150
|
)),
|
|
151
151
|
type: 'string'
|
|
152
152
|
},
|
|
153
153
|
isSticky: {
|
|
154
154
|
description: ( localize(
|
|
155
|
-
|
|
155
|
+
4495,
|
|
156
156
|
"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."
|
|
157
157
|
)),
|
|
158
158
|
type: 'boolean'
|
|
159
159
|
},
|
|
160
160
|
disambiguation: {
|
|
161
161
|
description: ( localize(
|
|
162
|
-
|
|
162
|
+
4507,
|
|
163
163
|
"Metadata to help with automatically routing user questions to this chat command."
|
|
164
164
|
)),
|
|
165
165
|
type: 'array',
|
|
@@ -171,21 +171,21 @@ const chatParticipantExtensionPoint = ExtensionsRegistry.registerExtensionPoint(
|
|
|
171
171
|
properties: {
|
|
172
172
|
category: {
|
|
173
173
|
markdownDescription: ( localize(
|
|
174
|
-
|
|
174
|
+
4508,
|
|
175
175
|
"A detailed name for this category, e.g. `workspace_questions` or `web_questions`."
|
|
176
176
|
)),
|
|
177
177
|
type: 'string'
|
|
178
178
|
},
|
|
179
179
|
description: {
|
|
180
180
|
description: ( localize(
|
|
181
|
-
|
|
181
|
+
4509,
|
|
182
182
|
"A detailed description of the kinds of questions that are suitable for this chat command."
|
|
183
183
|
)),
|
|
184
184
|
type: 'string'
|
|
185
185
|
},
|
|
186
186
|
examples: {
|
|
187
187
|
description: ( localize(
|
|
188
|
-
|
|
188
|
+
4510,
|
|
189
189
|
"A list of representative example questions that are suitable for this chat command."
|
|
190
190
|
)),
|
|
191
191
|
type: 'array'
|
|
@@ -288,7 +288,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
registerViewContainer() {
|
|
291
|
-
const title = ( localize2(
|
|
291
|
+
const title = ( localize2(4511, "Chat"));
|
|
292
292
|
const icon = Codicon.commentDiscussion;
|
|
293
293
|
const viewContainerId = CHAT_SIDEBAR_PANEL_ID;
|
|
294
294
|
const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
@@ -311,13 +311,13 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
311
311
|
containerIcon: this._viewContainer.icon,
|
|
312
312
|
containerTitle: this._viewContainer.title.value,
|
|
313
313
|
singleViewPaneContainerTitle: this._viewContainer.title.value,
|
|
314
|
-
name: ( localize2(
|
|
314
|
+
name: ( localize2(4511, "Chat")),
|
|
315
315
|
canToggleVisibility: false,
|
|
316
316
|
canMoveView: true,
|
|
317
317
|
openCommandActionDescriptor: {
|
|
318
318
|
id: CHAT_SIDEBAR_PANEL_ID,
|
|
319
319
|
title: this._viewContainer.title,
|
|
320
|
-
mnemonicTitle: ( localize(
|
|
320
|
+
mnemonicTitle: ( localize(4512, "&&Chat")),
|
|
321
321
|
keybindings: {
|
|
322
322
|
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyI,
|
|
323
323
|
mac: {
|
|
@@ -335,7 +335,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
337
|
registerChatEditingView() {
|
|
338
|
-
const title = ( localize2(
|
|
338
|
+
const title = ( localize2(4513, "Copilot Edits"));
|
|
339
339
|
const icon = Codicon.editSession;
|
|
340
340
|
const viewContainerId = CHAT_EDITING_SIDEBAR_PANEL_ID;
|
|
341
341
|
const viewContainer = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
@@ -362,7 +362,7 @@ let ChatExtensionPointHandler = class ChatExtensionPointHandler {
|
|
|
362
362
|
openCommandActionDescriptor: {
|
|
363
363
|
id: viewContainerId,
|
|
364
364
|
title,
|
|
365
|
-
mnemonicTitle: ( localize(
|
|
365
|
+
mnemonicTitle: ( localize(4514, "Copilot Ed&&its")),
|
|
366
366
|
keybindings: {
|
|
367
367
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyI,
|
|
368
368
|
linux: {
|
|
@@ -415,9 +415,9 @@ let ChatCompatibilityNotifier = class ChatCompatibilityNotifier extends Disposab
|
|
|
415
415
|
return;
|
|
416
416
|
}
|
|
417
417
|
this.registeredWelcomeView = true;
|
|
418
|
-
const showExtensionLabel = ( localize(
|
|
418
|
+
const showExtensionLabel = ( localize(4515, "Show Extension"));
|
|
419
419
|
const mainMessage = ( localize(
|
|
420
|
-
|
|
420
|
+
4516,
|
|
421
421
|
"Chat failed to load because the installed version of the Copilot Chat extension is not compatible with this version of {0}. Please ensure that the Copilot Chat extension is up to date.",
|
|
422
422
|
this.productService.nameLong
|
|
423
423
|
));
|
|
@@ -58,7 +58,7 @@ class PasteImageProvider {
|
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
const attachedVariables = widget.attachmentModel.attachments;
|
|
61
|
-
const displayName = ( localize(
|
|
61
|
+
const displayName = ( localize(4517, 'Pasted Image'));
|
|
62
62
|
let tempDisplayName = displayName;
|
|
63
63
|
for (let appendValue = 2; ( attachedVariables.some(attachment => attachment.name === tempDisplayName)); appendValue++) {
|
|
64
64
|
tempDisplayName = `${displayName} ${appendValue}`;
|
|
@@ -71,7 +71,7 @@ class PasteImageProvider {
|
|
|
71
71
|
if (( currentContextIds.has(imageContext.id))) {
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
const edit = createCustomPasteEdit(model, imageContext, mimeType, this.kind, ( localize(
|
|
74
|
+
const edit = createCustomPasteEdit(model, imageContext, mimeType, this.kind, ( localize(4518, 'Pasted Image Attachment')), this.chatWidgetService);
|
|
75
75
|
return createEditSession(edit);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -170,7 +170,7 @@ class PasteTextProvider {
|
|
|
170
170
|
if (( currentContextIds.has(copiedContext.id))) {
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
const edit = createCustomPasteEdit(model, copiedContext, Mimes.text, this.kind, ( localize(
|
|
173
|
+
const edit = createCustomPasteEdit(model, copiedContext, Mimes.text, this.kind, ( localize(4519, 'Pasted Code Attachment')), this.chatWidgetService);
|
|
174
174
|
edit.yieldTo = [{ kind: HierarchicalKind.Empty.append('text', 'plain') }];
|
|
175
175
|
return createEditSession(edit);
|
|
176
176
|
}
|
|
@@ -180,7 +180,7 @@ function getCopiedContext(code, file, language, range) {
|
|
|
180
180
|
const start = range.startLineNumber;
|
|
181
181
|
const end = range.endLineNumber;
|
|
182
182
|
const resultText = `Copied Selection of Code: \n\n\n From the file: ${fileName} From lines ${start} to ${end} \n \`\`\`${code}\`\`\``;
|
|
183
|
-
const pastedLines = start === end ? ( localize(
|
|
183
|
+
const pastedLines = start === end ? ( localize(4520, '1 line')) : ( localize(4521, '{0} lines', end + 1 - start));
|
|
184
184
|
return {
|
|
185
185
|
kind: 'paste',
|
|
186
186
|
value: resultText,
|