@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-chat-service-override",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@11.0.
|
|
30
|
-
"@codingame/monaco-vscode-chat-extensions-notebook-common": "11.0.
|
|
31
|
-
"@codingame/monaco-vscode-chat-extensions-interactive-notebook-quickaccess-search-terminal-common": "11.0.
|
|
32
|
-
"@codingame/monaco-vscode-chat-notebook-common": "11.0.
|
|
33
|
-
"@codingame/monaco-vscode-chat-interactive-notebook-search-common": "11.0.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@11.0.1",
|
|
30
|
+
"@codingame/monaco-vscode-chat-extensions-notebook-common": "11.0.1",
|
|
31
|
+
"@codingame/monaco-vscode-chat-extensions-interactive-notebook-quickaccess-search-terminal-common": "11.0.1",
|
|
32
|
+
"@codingame/monaco-vscode-chat-notebook-common": "11.0.1",
|
|
33
|
+
"@codingame/monaco-vscode-chat-interactive-notebook-search-common": "11.0.1"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -44,44 +44,44 @@ function getAccessibilityHelpText(type, keybindingService) {
|
|
|
44
44
|
const content = [];
|
|
45
45
|
if (type === 'panelChat' || type === 'quickChat') {
|
|
46
46
|
content.push(( localize(
|
|
47
|
-
|
|
47
|
+
7530,
|
|
48
48
|
'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.'
|
|
49
49
|
)));
|
|
50
50
|
content.push(( localize(
|
|
51
|
-
|
|
51
|
+
7531,
|
|
52
52
|
'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.'
|
|
53
53
|
)));
|
|
54
54
|
content.push(( localize(
|
|
55
|
-
|
|
55
|
+
7532,
|
|
56
56
|
'In the input box, inspect the last response in the accessible view{0}.',
|
|
57
57
|
'<keybinding:editor.action.accessibleView>'
|
|
58
58
|
)));
|
|
59
59
|
content.push(( localize(
|
|
60
|
-
|
|
60
|
+
7533,
|
|
61
61
|
'In the input box, navigate to the suggested follow up question (Shift+Tab) and press Enter to run it.'
|
|
62
62
|
)));
|
|
63
63
|
content.push(( localize(
|
|
64
|
-
|
|
64
|
+
7534,
|
|
65
65
|
'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.'
|
|
66
66
|
)));
|
|
67
67
|
content.push(( localize(
|
|
68
|
-
|
|
68
|
+
7535,
|
|
69
69
|
'To focus the chat request/response list, which can be navigated with up and down arrows, invoke the Focus Chat command{0}.',
|
|
70
70
|
getChatFocusKeybindingLabel(keybindingService, type, false)
|
|
71
71
|
)));
|
|
72
72
|
content.push(( localize(
|
|
73
|
-
|
|
73
|
+
7536,
|
|
74
74
|
'To focus the input box for chat requests, invoke the Focus Chat Input command{0}.',
|
|
75
75
|
getChatFocusKeybindingLabel(keybindingService, type, true)
|
|
76
76
|
)));
|
|
77
77
|
content.push(( localize(
|
|
78
|
-
|
|
78
|
+
7537,
|
|
79
79
|
'To focus the next code block within a response, invoke the Chat: Next Code Block command{0}.',
|
|
80
80
|
'<keybinding:workbench.action.chat.nextCodeBlock>'
|
|
81
81
|
)));
|
|
82
82
|
if (type === 'panelChat') {
|
|
83
83
|
content.push(( localize(
|
|
84
|
-
|
|
84
|
+
7538,
|
|
85
85
|
'To create a new chat session, invoke the New Chat command{0}.',
|
|
86
86
|
'<keybinding:workbench.action.chat.new>'
|
|
87
87
|
)));
|
|
@@ -89,45 +89,45 @@ function getAccessibilityHelpText(type, keybindingService) {
|
|
|
89
89
|
}
|
|
90
90
|
else {
|
|
91
91
|
content.push(( localize(
|
|
92
|
-
|
|
92
|
+
7539,
|
|
93
93
|
"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."
|
|
94
94
|
)));
|
|
95
95
|
content.push(( localize(
|
|
96
|
-
|
|
96
|
+
7540,
|
|
97
97
|
"It can be activated via code actions or directly using the command: Inline Chat: Start Inline Chat{0}.",
|
|
98
98
|
'<keybinding:inlineChat.start>'
|
|
99
99
|
)));
|
|
100
100
|
content.push(( localize(
|
|
101
|
-
|
|
101
|
+
7541,
|
|
102
102
|
'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.',
|
|
103
103
|
'<keybinding:history.showPrevious>',
|
|
104
104
|
'<keybinding:history.showNext>'
|
|
105
105
|
)));
|
|
106
106
|
content.push(( localize(
|
|
107
|
-
|
|
107
|
+
7542,
|
|
108
108
|
'In the input box, inspect the response in the accessible view{0}.',
|
|
109
109
|
'<keybinding:editor.action.accessibleView>'
|
|
110
110
|
)));
|
|
111
111
|
content.push(( localize(
|
|
112
|
-
|
|
112
|
+
7543,
|
|
113
113
|
"Context menu actions may run a request prefixed with a /. Type / to discover such ready-made commands."
|
|
114
114
|
)));
|
|
115
115
|
content.push(( localize(
|
|
116
|
-
|
|
116
|
+
7544,
|
|
117
117
|
"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."
|
|
118
118
|
)));
|
|
119
119
|
content.push(( localize(
|
|
120
|
-
|
|
120
|
+
7545,
|
|
121
121
|
"Once in the diff editor, enter review mode with{0}. Use up and down arrows to navigate lines with the proposed changes.",
|
|
122
122
|
AccessibleDiffViewerNext.id
|
|
123
123
|
)));
|
|
124
124
|
content.push(( localize(
|
|
125
|
-
|
|
125
|
+
7546,
|
|
126
126
|
"Use tab to reach conditional parts like commands, status, message responses and more."
|
|
127
127
|
)));
|
|
128
128
|
}
|
|
129
129
|
content.push(( localize(
|
|
130
|
-
|
|
130
|
+
7547,
|
|
131
131
|
"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."
|
|
132
132
|
)));
|
|
133
133
|
return content.join('\n');
|
|
@@ -25,7 +25,7 @@ function registerNewChatActions() {
|
|
|
25
25
|
constructor() {
|
|
26
26
|
super({
|
|
27
27
|
id: 'workbench.action.chatEditor.newChat',
|
|
28
|
-
title: ( localize2(
|
|
28
|
+
title: ( localize2(7548, "New Chat")),
|
|
29
29
|
icon: Codicon.plus,
|
|
30
30
|
f1: false,
|
|
31
31
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
@@ -46,7 +46,7 @@ function registerNewChatActions() {
|
|
|
46
46
|
constructor() {
|
|
47
47
|
super({
|
|
48
48
|
id: ACTION_ID_NEW_CHAT,
|
|
49
|
-
title: ( localize2(
|
|
49
|
+
title: ( localize2(7548, "New Chat")),
|
|
50
50
|
category: CHAT_CATEGORY,
|
|
51
51
|
icon: Codicon.plus,
|
|
52
52
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -93,7 +93,7 @@ function registerNewChatActions() {
|
|
|
93
93
|
constructor() {
|
|
94
94
|
super({
|
|
95
95
|
id: ACTION_ID_NEW_EDIT_SESSION,
|
|
96
|
-
title: ( localize2(
|
|
96
|
+
title: ( localize2(7549, "New Edit Session")),
|
|
97
97
|
category: CHAT_CATEGORY,
|
|
98
98
|
icon: Codicon.plus,
|
|
99
99
|
precondition: ( (ContextKeyExpr.and(CONTEXT_CHAT_ENABLED, CONTEXT_CHAT_EDITING_PARTICIPANT_REGISTERED))),
|
|
@@ -119,9 +119,9 @@ function registerNewChatActions() {
|
|
|
119
119
|
const undecidedEdits = currentEdits.filter((edit) => edit.state.get() === 0 );
|
|
120
120
|
if (undecidedEdits.length) {
|
|
121
121
|
const { result } = await dialogService.prompt({
|
|
122
|
-
title: ( localize(
|
|
122
|
+
title: ( localize(7550, "Start new editing session?")),
|
|
123
123
|
message: ( localize(
|
|
124
|
-
|
|
124
|
+
7551,
|
|
125
125
|
"Starting a new editing session will end your current session. Do you want to discard pending edits to {0} files?",
|
|
126
126
|
undecidedEdits.length
|
|
127
127
|
)),
|
|
@@ -129,14 +129,14 @@ function registerNewChatActions() {
|
|
|
129
129
|
cancelButton: true,
|
|
130
130
|
buttons: [
|
|
131
131
|
{
|
|
132
|
-
label: ( localize(
|
|
132
|
+
label: ( localize(7552, "Discard & Continue")),
|
|
133
133
|
run: async () => {
|
|
134
134
|
await currentEditingSession.reject();
|
|
135
135
|
return true;
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
label: ( localize(
|
|
139
|
+
label: ( localize(7553, "Accept & Continue")),
|
|
140
140
|
run: async () => {
|
|
141
141
|
await currentEditingSession.accept();
|
|
142
142
|
return true;
|
|
@@ -184,7 +184,7 @@ function registerNewChatActions() {
|
|
|
184
184
|
constructor() {
|
|
185
185
|
super({
|
|
186
186
|
id: 'workbench.action.chat.done',
|
|
187
|
-
title: ( localize2(
|
|
187
|
+
title: ( localize2(7554, "Done")),
|
|
188
188
|
category: CHAT_CATEGORY,
|
|
189
189
|
precondition: ( (ContextKeyExpr.and(CONTEXT_CHAT_ENABLED, CONTEXT_CHAT_EDITING_PARTICIPANT_REGISTERED))),
|
|
190
190
|
f1: false,
|
|
@@ -229,7 +229,7 @@ function registerNewChatActions() {
|
|
|
229
229
|
constructor() {
|
|
230
230
|
super({
|
|
231
231
|
id: 'workbench.action.chat.undoEdit',
|
|
232
|
-
title: ( localize2(
|
|
232
|
+
title: ( localize2(7555, "Undo Last Edit")),
|
|
233
233
|
category: CHAT_CATEGORY,
|
|
234
234
|
icon: Codicon.discard,
|
|
235
235
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -262,7 +262,7 @@ function registerNewChatActions() {
|
|
|
262
262
|
constructor() {
|
|
263
263
|
super({
|
|
264
264
|
id: 'workbench.action.chat.redoEdit',
|
|
265
|
-
title: ( localize2(
|
|
265
|
+
title: ( localize2(7556, "Redo Last Edit")),
|
|
266
266
|
category: CHAT_CATEGORY,
|
|
267
267
|
icon: Codicon.redo,
|
|
268
268
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -295,7 +295,7 @@ function registerNewChatActions() {
|
|
|
295
295
|
constructor() {
|
|
296
296
|
super({
|
|
297
297
|
id: 'workbench.action.chat.openEditSession',
|
|
298
|
-
title: ( localize2(
|
|
298
|
+
title: ( localize2(7557, "Open {0}", 'Copilot Edits')),
|
|
299
299
|
category: CHAT_CATEGORY,
|
|
300
300
|
icon: Codicon.goToEditingSession,
|
|
301
301
|
precondition: ( (ContextKeyExpr.and(CONTEXT_CHAT_ENABLED, CONTEXT_CHAT_EDITING_PARTICIPANT_REGISTERED))),
|
|
@@ -61,7 +61,7 @@ function registerChatCodeBlockActions() {
|
|
|
61
61
|
constructor() {
|
|
62
62
|
super({
|
|
63
63
|
id: 'workbench.action.chat.copyCodeBlock',
|
|
64
|
-
title: ( localize2(
|
|
64
|
+
title: ( localize2(7558, "Copy")),
|
|
65
65
|
f1: false,
|
|
66
66
|
category: CHAT_CATEGORY,
|
|
67
67
|
icon: Codicon.copy,
|
|
@@ -146,7 +146,7 @@ function registerChatCodeBlockActions() {
|
|
|
146
146
|
constructor() {
|
|
147
147
|
super({
|
|
148
148
|
id: 'workbench.action.chat.applyInEditor',
|
|
149
|
-
title: ( localize2(
|
|
149
|
+
title: ( localize2(7559, "Apply in Editor")),
|
|
150
150
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
151
151
|
f1: true,
|
|
152
152
|
category: CHAT_CATEGORY,
|
|
@@ -181,7 +181,7 @@ function registerChatCodeBlockActions() {
|
|
|
181
181
|
constructor() {
|
|
182
182
|
super({
|
|
183
183
|
id: 'workbench.action.chat.applyAll',
|
|
184
|
-
title: ( localize2(
|
|
184
|
+
title: ( localize2(7560, "Apply All Edits")),
|
|
185
185
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
186
186
|
f1: true,
|
|
187
187
|
category: CHAT_CATEGORY,
|
|
@@ -208,7 +208,7 @@ function registerChatCodeBlockActions() {
|
|
|
208
208
|
constructor() {
|
|
209
209
|
super({
|
|
210
210
|
id: 'workbench.action.chat.insertCodeBlock',
|
|
211
|
-
title: ( localize2(
|
|
211
|
+
title: ( localize2(7561, "Insert At Cursor")),
|
|
212
212
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
213
213
|
f1: true,
|
|
214
214
|
category: CHAT_CATEGORY,
|
|
@@ -239,7 +239,7 @@ function registerChatCodeBlockActions() {
|
|
|
239
239
|
constructor() {
|
|
240
240
|
super({
|
|
241
241
|
id: 'workbench.action.chat.insertIntoNewFile',
|
|
242
|
-
title: ( localize2(
|
|
242
|
+
title: ( localize2(7562, "Insert into New File")),
|
|
243
243
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
244
244
|
f1: true,
|
|
245
245
|
category: CHAT_CATEGORY,
|
|
@@ -280,7 +280,7 @@ function registerChatCodeBlockActions() {
|
|
|
280
280
|
constructor() {
|
|
281
281
|
super({
|
|
282
282
|
id: 'workbench.action.chat.runInTerminal',
|
|
283
|
-
title: ( localize2(
|
|
283
|
+
title: ( localize2(7563, "Insert into Terminal")),
|
|
284
284
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
285
285
|
f1: true,
|
|
286
286
|
category: CHAT_CATEGORY,
|
|
@@ -380,7 +380,7 @@ function registerChatCodeBlockActions() {
|
|
|
380
380
|
constructor() {
|
|
381
381
|
super({
|
|
382
382
|
id: 'workbench.action.chat.nextCodeBlock',
|
|
383
|
-
title: ( localize2(
|
|
383
|
+
title: ( localize2(7564, "Next Code Block")),
|
|
384
384
|
keybinding: {
|
|
385
385
|
primary: 2048 | 512 | 12 ,
|
|
386
386
|
mac: { primary: 2048 | 512 | 12 , },
|
|
@@ -400,7 +400,7 @@ function registerChatCodeBlockActions() {
|
|
|
400
400
|
constructor() {
|
|
401
401
|
super({
|
|
402
402
|
id: 'workbench.action.chat.previousCodeBlock',
|
|
403
|
-
title: ( localize2(
|
|
403
|
+
title: ( localize2(7565, "Previous Code Block")),
|
|
404
404
|
keybinding: {
|
|
405
405
|
primary: 2048 | 512 | 11 ,
|
|
406
406
|
mac: { primary: 2048 | 512 | 11 , },
|
|
@@ -457,7 +457,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
457
457
|
constructor() {
|
|
458
458
|
super({
|
|
459
459
|
id: 'workbench.action.chat.applyCompareEdits',
|
|
460
|
-
title: ( localize2(
|
|
460
|
+
title: ( localize2(7566, "Apply Edits")),
|
|
461
461
|
f1: false,
|
|
462
462
|
category: CHAT_CATEGORY,
|
|
463
463
|
icon: Codicon.check,
|
|
@@ -487,7 +487,7 @@ function registerChatCodeCompareBlockActions() {
|
|
|
487
487
|
constructor() {
|
|
488
488
|
super({
|
|
489
489
|
id: 'workbench.action.chat.discardCompareEdits',
|
|
490
|
-
title: ( localize2(
|
|
490
|
+
title: ( localize2(7567, "Discard Edits")),
|
|
491
491
|
f1: false,
|
|
492
492
|
category: CHAT_CATEGORY,
|
|
493
493
|
icon: Codicon.trash,
|
|
@@ -80,7 +80,7 @@ class AttachFileAction extends Action2 {
|
|
|
80
80
|
constructor() {
|
|
81
81
|
super({
|
|
82
82
|
id: AttachFileAction.ID,
|
|
83
|
-
title: ( localize2(
|
|
83
|
+
title: ( localize2(7568, "Add File to Chat")),
|
|
84
84
|
category: CHAT_CATEGORY,
|
|
85
85
|
f1: false,
|
|
86
86
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -109,7 +109,7 @@ class AttachSelectionAction extends Action2 {
|
|
|
109
109
|
constructor() {
|
|
110
110
|
super({
|
|
111
111
|
id: AttachSelectionAction.ID,
|
|
112
|
-
title: ( localize2(
|
|
112
|
+
title: ( localize2(7569, "Add Selection to Chat")),
|
|
113
113
|
category: CHAT_CATEGORY,
|
|
114
114
|
f1: false,
|
|
115
115
|
precondition: ( (ContextKeyExpr.and(
|
|
@@ -151,7 +151,7 @@ class AttachContextAction extends Action2 {
|
|
|
151
151
|
))); }
|
|
152
152
|
constructor(desc = {
|
|
153
153
|
id: AttachContextAction.ID,
|
|
154
|
-
title: ( localize2(
|
|
154
|
+
title: ( localize2(7570, "Attach Context")),
|
|
155
155
|
icon: Codicon.attach,
|
|
156
156
|
category: CHAT_CATEGORY,
|
|
157
157
|
precondition: ( (ContextKeyExpr.or(AttachContextAction._cdt, (ContextKeyExpr.and(
|
|
@@ -316,8 +316,8 @@ class AttachContextAction extends Action2 {
|
|
|
316
316
|
const fileBuffer = await clipboardService.readImage();
|
|
317
317
|
toAttach.push({
|
|
318
318
|
id: await imageToHash(fileBuffer),
|
|
319
|
-
name: ( localize(
|
|
320
|
-
fullName: ( localize(
|
|
319
|
+
name: ( localize(7571, 'Pasted Image')),
|
|
320
|
+
fullName: ( localize(7571, 'Pasted Image')),
|
|
321
321
|
value: fileBuffer,
|
|
322
322
|
isDynamic: true,
|
|
323
323
|
isImage: true
|
|
@@ -382,7 +382,7 @@ class AttachContextAction extends Action2 {
|
|
|
382
382
|
quickPickItems.push({
|
|
383
383
|
kind: 'image',
|
|
384
384
|
id: await imageToHash(imageData),
|
|
385
|
-
label: ( localize(
|
|
385
|
+
label: ( localize(7572, 'Image from Clipboard')),
|
|
386
386
|
iconClass: ThemeIcon.asClassName(Codicon.fileMedia),
|
|
387
387
|
});
|
|
388
388
|
}
|
|
@@ -392,8 +392,8 @@ class AttachContextAction extends Action2 {
|
|
|
392
392
|
icon: ThemeIcon.fromId(Codicon.deviceCamera.id),
|
|
393
393
|
iconClass: ThemeIcon.asClassName(Codicon.deviceCamera),
|
|
394
394
|
label: (isElectron
|
|
395
|
-
? ( localize(
|
|
396
|
-
: ( localize(
|
|
395
|
+
? ( localize(7573, 'Screenshot Window'))
|
|
396
|
+
: ( localize(7574, 'Screenshot'))),
|
|
397
397
|
});
|
|
398
398
|
}
|
|
399
399
|
if (widget.viewModel?.sessionId) {
|
|
@@ -436,7 +436,7 @@ class AttachContextAction extends Action2 {
|
|
|
436
436
|
}
|
|
437
437
|
quickPickItems.push({
|
|
438
438
|
kind: 'quickaccess',
|
|
439
|
-
label: ( localize(
|
|
439
|
+
label: ( localize(7575, 'Symbol...')),
|
|
440
440
|
iconClass: ThemeIcon.asClassName(Codicon.symbolField),
|
|
441
441
|
prefix: SymbolsQuickAccessProvider.PREFIX,
|
|
442
442
|
id: 'symbol'
|
|
@@ -449,10 +449,10 @@ class AttachContextAction extends Action2 {
|
|
|
449
449
|
icon: ThemeIcon.fromId(Codicon.serverEnvironment.id),
|
|
450
450
|
iconClass: ThemeIcon.asClassName(Codicon.serverEnvironment),
|
|
451
451
|
value: 'kernelVariable',
|
|
452
|
-
label: ( localize(
|
|
452
|
+
label: ( localize(7576, 'Kernel Variable...')),
|
|
453
453
|
command: {
|
|
454
454
|
id: 'notebook.chat.selectAndInsertKernelVariable',
|
|
455
|
-
title: ( localize(
|
|
455
|
+
title: ( localize(7577, 'Select and Insert Kernel Variable')),
|
|
456
456
|
arguments: [{ widget, range: undefined }]
|
|
457
457
|
}
|
|
458
458
|
});
|
|
@@ -463,7 +463,7 @@ class AttachContextAction extends Action2 {
|
|
|
463
463
|
quickPickItems.push({
|
|
464
464
|
kind: 'open-editors',
|
|
465
465
|
id: 'open-editors',
|
|
466
|
-
label: ( localize(
|
|
466
|
+
label: ( localize(7578, 'Open Editors')),
|
|
467
467
|
iconClass: ThemeIcon.asClassName(Codicon.files),
|
|
468
468
|
});
|
|
469
469
|
}
|
|
@@ -471,7 +471,7 @@ class AttachContextAction extends Action2 {
|
|
|
471
471
|
quickPickItems.push({
|
|
472
472
|
kind: 'search-results',
|
|
473
473
|
id: 'search-results',
|
|
474
|
-
label: ( localize(
|
|
474
|
+
label: ( localize(7579, 'Search Results')),
|
|
475
475
|
iconClass: ThemeIcon.asClassName(Codicon.search),
|
|
476
476
|
});
|
|
477
477
|
}
|
|
@@ -546,7 +546,7 @@ class AttachContextAction extends Action2 {
|
|
|
546
546
|
SymbolsQuickAccessProvider.PREFIX,
|
|
547
547
|
AbstractGotoSymbolQuickAccessProvider.PREFIX
|
|
548
548
|
],
|
|
549
|
-
placeholder: placeholder ?? ( localize(
|
|
549
|
+
placeholder: placeholder ?? ( localize(7580, 'Search attachments')),
|
|
550
550
|
providerOptions,
|
|
551
551
|
});
|
|
552
552
|
}
|
|
@@ -555,7 +555,7 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
|
|
|
555
555
|
constructor() {
|
|
556
556
|
super({
|
|
557
557
|
id: 'workbench.action.chat.editing.attachFiles',
|
|
558
|
-
title: ( localize2(
|
|
558
|
+
title: ( localize2(7581, "Add Files to Working Set")),
|
|
559
559
|
f1: false,
|
|
560
560
|
category: CHAT_CATEGORY,
|
|
561
561
|
precondition: ( (CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.EditingSession)))
|
|
@@ -563,7 +563,7 @@ registerAction2(class AttachFilesAction extends AttachContextAction {
|
|
|
563
563
|
}
|
|
564
564
|
async run(accessor, ...args) {
|
|
565
565
|
const context = args[0];
|
|
566
|
-
const attachFilesContext = { ...context, showFilesOnly: true, placeholder: ( localize(
|
|
566
|
+
const attachFilesContext = { ...context, showFilesOnly: true, placeholder: ( localize(7582, 'Search for files to add to your working set')) };
|
|
567
567
|
return super.run(accessor, attachFilesContext);
|
|
568
568
|
}
|
|
569
569
|
});
|
|
@@ -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(7583, "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(7584, "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(7585, "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(7597, "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(7598, "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(7599, "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(7600, "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(7601, "Import Chat...")),
|
|
58
58
|
category: CHAT_CATEGORY,
|
|
59
59
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
60
60
|
f1: true,
|
|
@@ -24,7 +24,7 @@ function registerMoveActions() {
|
|
|
24
24
|
constructor() {
|
|
25
25
|
super({
|
|
26
26
|
id: `workbench.action.chat.openInEditor`,
|
|
27
|
-
title: ( localize2(
|
|
27
|
+
title: ( localize2(7602, "Open Chat in Editor")),
|
|
28
28
|
category: CHAT_CATEGORY,
|
|
29
29
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
30
30
|
f1: true,
|
|
@@ -44,7 +44,7 @@ function registerMoveActions() {
|
|
|
44
44
|
constructor() {
|
|
45
45
|
super({
|
|
46
46
|
id: `workbench.action.chat.openInNewWindow`,
|
|
47
|
-
title: ( localize2(
|
|
47
|
+
title: ( localize2(7603, "Open Chat in New Window")),
|
|
48
48
|
category: CHAT_CATEGORY,
|
|
49
49
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
50
50
|
f1: true,
|
|
@@ -64,7 +64,7 @@ function registerMoveActions() {
|
|
|
64
64
|
constructor() {
|
|
65
65
|
super({
|
|
66
66
|
id: `workbench.action.chat.openInSidebar`,
|
|
67
|
-
title: ( localize2(
|
|
67
|
+
title: ( localize2(7604, "Open Chat in Side Bar")),
|
|
68
68
|
category: CHAT_CATEGORY,
|
|
69
69
|
precondition: CONTEXT_CHAT_ENABLED,
|
|
70
70
|
f1: true,
|
|
@@ -48,7 +48,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
48
48
|
}
|
|
49
49
|
else {
|
|
50
50
|
this.notify(( localize(
|
|
51
|
-
|
|
51
|
+
10864,
|
|
52
52
|
"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."
|
|
53
53
|
)));
|
|
54
54
|
}
|
|
@@ -61,7 +61,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
61
61
|
}
|
|
62
62
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
63
63
|
if (notebookEditor.isReadOnly) {
|
|
64
|
-
this.notify(( localize(
|
|
64
|
+
this.notify(( localize(10865, "Cannot insert the code block to read-only notebook editor.")));
|
|
65
65
|
return false;
|
|
66
66
|
}
|
|
67
67
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -72,7 +72,7 @@ let InsertCodeBlockOperation = class InsertCodeBlockOperation {
|
|
|
72
72
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
73
73
|
const activeModel = codeEditor.getModel();
|
|
74
74
|
if (isReadOnly(activeModel, this.textFileService)) {
|
|
75
|
-
this.notify(( localize(
|
|
75
|
+
this.notify(( localize(10866, "Cannot insert the code block to read-only code editor.")));
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
const range = codeEditor.getSelection() ?? ( (new Range(activeModel.getLineCount(), 1, activeModel.getLineCount(), 1)));
|
|
@@ -112,7 +112,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
112
112
|
async run(context) {
|
|
113
113
|
if (this.inlineChatPreview && this.inlineChatPreview.isOpen()) {
|
|
114
114
|
await this.dialogService.info(( localize(
|
|
115
|
-
|
|
115
|
+
10867,
|
|
116
116
|
"Another code change is being previewed. Please apply or discard the pending changes first."
|
|
117
117
|
)));
|
|
118
118
|
return;
|
|
@@ -143,7 +143,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
143
143
|
result = await this.handleNotebookEditor(activeNotebookEditor, context);
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
-
this.notify(( localize(
|
|
146
|
+
this.notify(( localize(10868, "To apply this code block, open a code or notebook editor.")));
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
notifyUserAction(this.chatService, context, {
|
|
@@ -156,7 +156,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
156
156
|
}
|
|
157
157
|
async handleNotebookEditor(notebookEditor, codeBlockContext) {
|
|
158
158
|
if (notebookEditor.isReadOnly) {
|
|
159
|
-
this.notify(( localize(
|
|
159
|
+
this.notify(( localize(10869, "Cannot apply code block to read-only notebook editor.")));
|
|
160
160
|
return undefined;
|
|
161
161
|
}
|
|
162
162
|
const focusRange = notebookEditor.getFocus();
|
|
@@ -166,7 +166,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
166
166
|
}
|
|
167
167
|
async handleTextEditor(codeEditor, codeBlockContext) {
|
|
168
168
|
if (isReadOnly(codeEditor.getModel(), this.textFileService)) {
|
|
169
|
-
this.notify(( localize(
|
|
169
|
+
this.notify(( localize(10870, "Cannot apply code block to read-only file.")));
|
|
170
170
|
return undefined;
|
|
171
171
|
}
|
|
172
172
|
const result = await this.computeEdits(codeEditor, codeBlockContext);
|
|
@@ -193,7 +193,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
193
193
|
const result = await this.progressService.withProgress({ location: 15 , delay: 500, sticky: true, cancellable: true }, async (progress) => {
|
|
194
194
|
for (const provider of mappedEditsProviders) {
|
|
195
195
|
codeMapper = provider.displayName;
|
|
196
|
-
progress.report({ message: ( localize(
|
|
196
|
+
progress.report({ message: ( localize(10871, "Applying code block using {0}...", codeMapper)) });
|
|
197
197
|
const mappedEdits = await provider.provideMappedEdits(activeModel, [codeBlockActionContext.code], {
|
|
198
198
|
documents: docRefs,
|
|
199
199
|
conversation: getChatConversation(codeBlockActionContext),
|
|
@@ -210,7 +210,7 @@ let ApplyCodeBlockOperation = class ApplyCodeBlockOperation {
|
|
|
210
210
|
}
|
|
211
211
|
catch (e) {
|
|
212
212
|
if (!isCancellationError(e)) {
|
|
213
|
-
this.notify(( localize(
|
|
213
|
+
this.notify(( localize(10872, "Failed to apply code block: {0}", e.message)));
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
finally {
|