@codingame/monaco-vscode-notebook-service-override 4.5.1 → 4.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +30 -44
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +24 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +30 -53
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +40 -84
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +9 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +35 -48
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +94 -77
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +8 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +25 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +71 -89
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +4 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +97 -119
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +7 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +128 -177
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +132 -145
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +70 -130
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +32 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +39 -64
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +28 -43
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +23 -66
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +58 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +162 -264
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +33 -36
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +58 -153
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +15 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +13 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +22 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +5 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +100 -92
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +6 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +41 -76
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +42 -45
|
@@ -14,18 +14,19 @@ import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/brows
|
|
|
14
14
|
import { CellKind, NOTEBOOK_EDITOR_CURSOR_BOUNDARY, NotebookSetting } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
15
15
|
import { NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_GENERATED_BY_CHAT } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
16
16
|
|
|
17
|
+
const _moduleId = "vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions";
|
|
17
18
|
registerAction2(class extends NotebookAction {
|
|
18
19
|
constructor() {
|
|
19
20
|
super({
|
|
20
21
|
id: 'notebook.cell.chat.accept',
|
|
21
|
-
title: ( localize2WithPath(
|
|
22
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
23
|
-
'notebook.cell.chat.accept',
|
|
24
|
-
"Make Request"
|
|
25
|
-
)),
|
|
22
|
+
title: ( localize2WithPath(_moduleId, 0, "Make Request")),
|
|
26
23
|
icon: Codicon.send,
|
|
27
24
|
keybinding: {
|
|
28
|
-
when: ( ContextKeyExpr.and(
|
|
25
|
+
when: ( (ContextKeyExpr.and(
|
|
26
|
+
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
27
|
+
CTX_INLINE_CHAT_FOCUSED,
|
|
28
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
29
|
+
))),
|
|
29
30
|
weight: 200 ,
|
|
30
31
|
primary: 3
|
|
31
32
|
},
|
|
@@ -33,7 +34,7 @@ registerAction2(class extends NotebookAction {
|
|
|
33
34
|
id: MENU_CELL_CHAT_INPUT,
|
|
34
35
|
group: 'navigation',
|
|
35
36
|
order: 1,
|
|
36
|
-
when: ( CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST.negate())
|
|
37
|
+
when: ( (CTX_NOTEBOOK_CHAT_HAS_ACTIVE_REQUEST.negate()))
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
}
|
|
@@ -45,19 +46,15 @@ registerAction2(class extends NotebookCellAction {
|
|
|
45
46
|
constructor() {
|
|
46
47
|
super({
|
|
47
48
|
id: 'notebook.cell.chat.arrowOutUp',
|
|
48
|
-
title: ( localizeWithPath(
|
|
49
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
50
|
-
'arrowUp',
|
|
51
|
-
'Cursor Up'
|
|
52
|
-
)),
|
|
49
|
+
title: ( localizeWithPath(_moduleId, 1, 'Cursor Up')),
|
|
53
50
|
keybinding: {
|
|
54
|
-
when: ( ContextKeyExpr.and(
|
|
51
|
+
when: ( (ContextKeyExpr.and(
|
|
55
52
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
56
53
|
CTX_INLINE_CHAT_FOCUSED,
|
|
57
54
|
CTX_INLINE_CHAT_INNER_CURSOR_FIRST,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
)),
|
|
55
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
|
|
56
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())
|
|
57
|
+
))),
|
|
61
58
|
weight: 0 + 7,
|
|
62
59
|
primary: 2048 | 16
|
|
63
60
|
}
|
|
@@ -83,19 +80,15 @@ registerAction2(class extends NotebookAction {
|
|
|
83
80
|
constructor() {
|
|
84
81
|
super({
|
|
85
82
|
id: 'notebook.cell.chat.arrowOutDown',
|
|
86
|
-
title: ( localizeWithPath(
|
|
87
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
88
|
-
'arrowDown',
|
|
89
|
-
'Cursor Down'
|
|
90
|
-
)),
|
|
83
|
+
title: ( localizeWithPath(_moduleId, 2, 'Cursor Down')),
|
|
91
84
|
keybinding: {
|
|
92
|
-
when: ( ContextKeyExpr.and(
|
|
85
|
+
when: ( (ContextKeyExpr.and(
|
|
93
86
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
94
87
|
CTX_INLINE_CHAT_FOCUSED,
|
|
95
88
|
CTX_INLINE_CHAT_INNER_CURSOR_LAST,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
)),
|
|
89
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
|
|
90
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate())
|
|
91
|
+
))),
|
|
99
92
|
weight: 0 + 7,
|
|
100
93
|
primary: 2048 | 18
|
|
101
94
|
}
|
|
@@ -109,13 +102,19 @@ registerAction2(class extends NotebookCellAction {
|
|
|
109
102
|
constructor() {
|
|
110
103
|
super({
|
|
111
104
|
id: 'notebook.cell.focusChatWidget',
|
|
112
|
-
title: ( localizeWithPath(
|
|
113
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
114
|
-
'focusChatWidget',
|
|
115
|
-
'Focus Chat Widget'
|
|
116
|
-
)),
|
|
105
|
+
title: ( localizeWithPath(_moduleId, 3, 'Focus Chat Widget')),
|
|
117
106
|
keybinding: {
|
|
118
|
-
when: (
|
|
107
|
+
when: ( (ContextKeyExpr.and(
|
|
108
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
109
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
110
|
+
(ContextKeyExpr.and(
|
|
111
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
112
|
+
EditorContextKeys.editorTextFocus,
|
|
113
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('bottom')),
|
|
114
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
|
|
115
|
+
)),
|
|
116
|
+
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
117
|
+
))),
|
|
119
118
|
weight: 0 + 7,
|
|
120
119
|
primary: 2048 | 16
|
|
121
120
|
}
|
|
@@ -130,13 +129,19 @@ registerAction2(class extends NotebookCellAction {
|
|
|
130
129
|
constructor() {
|
|
131
130
|
super({
|
|
132
131
|
id: 'notebook.cell.focusNextChatWidget',
|
|
133
|
-
title: ( localizeWithPath(
|
|
134
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
135
|
-
'focusNextChatWidget',
|
|
136
|
-
'Focus Next Cell Chat Widget'
|
|
137
|
-
)),
|
|
132
|
+
title: ( localizeWithPath(_moduleId, 4, 'Focus Next Cell Chat Widget')),
|
|
138
133
|
keybinding: {
|
|
139
|
-
when: (
|
|
134
|
+
when: ( (ContextKeyExpr.and(
|
|
135
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
136
|
+
(CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
|
|
137
|
+
(ContextKeyExpr.and(
|
|
138
|
+
(ContextKeyExpr.has(InputFocusedContextKey)),
|
|
139
|
+
EditorContextKeys.editorTextFocus,
|
|
140
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('top')),
|
|
141
|
+
(NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo('none'))
|
|
142
|
+
)),
|
|
143
|
+
(EditorContextKeys.isEmbeddedDiffEditor.negate())
|
|
144
|
+
))),
|
|
140
145
|
weight: 0 + 7,
|
|
141
146
|
primary: 2048 | 18
|
|
142
147
|
}
|
|
@@ -151,11 +156,7 @@ registerAction2(class extends NotebookAction {
|
|
|
151
156
|
constructor() {
|
|
152
157
|
super({
|
|
153
158
|
id: 'notebook.cell.chat.stop',
|
|
154
|
-
title: ( localize2WithPath(
|
|
155
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
156
|
-
'notebook.cell.chat.stop',
|
|
157
|
-
"Stop Request"
|
|
158
|
-
)),
|
|
159
|
+
title: ( localize2WithPath(_moduleId, 5, "Stop Request")),
|
|
159
160
|
icon: Codicon.debugStop,
|
|
160
161
|
menu: {
|
|
161
162
|
id: MENU_CELL_CHAT_INPUT,
|
|
@@ -173,11 +174,7 @@ registerAction2(class extends NotebookAction {
|
|
|
173
174
|
constructor() {
|
|
174
175
|
super({
|
|
175
176
|
id: 'notebook.cell.chat.close',
|
|
176
|
-
title: ( localize2WithPath(
|
|
177
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
178
|
-
'notebook.cell.chat.close',
|
|
179
|
-
"Close Chat"
|
|
180
|
-
)),
|
|
177
|
+
title: ( localize2WithPath(_moduleId, 6, "Close Chat")),
|
|
181
178
|
icon: Codicon.close,
|
|
182
179
|
menu: {
|
|
183
180
|
id: MENU_CELL_CHAT_WIDGET,
|
|
@@ -194,45 +191,37 @@ registerAction2(class extends NotebookAction {
|
|
|
194
191
|
constructor() {
|
|
195
192
|
super({
|
|
196
193
|
id: 'notebook.cell.chat.acceptChanges',
|
|
197
|
-
title: ( localize2WithPath(
|
|
198
|
-
|
|
199
|
-
'apply1',
|
|
200
|
-
"Accept Changes"
|
|
201
|
-
)),
|
|
202
|
-
shortTitle: ( localizeWithPath(
|
|
203
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
204
|
-
'apply2',
|
|
205
|
-
'Accept'
|
|
206
|
-
)),
|
|
194
|
+
title: ( localize2WithPath(_moduleId, 7, "Accept Changes")),
|
|
195
|
+
shortTitle: ( localizeWithPath(_moduleId, 8, 'Accept')),
|
|
207
196
|
icon: Codicon.check,
|
|
208
|
-
tooltip: ( localizeWithPath(
|
|
209
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
210
|
-
'apply3',
|
|
211
|
-
'Accept Changes'
|
|
212
|
-
)),
|
|
197
|
+
tooltip: ( localizeWithPath(_moduleId, 9, 'Accept Changes')),
|
|
213
198
|
keybinding: [
|
|
214
199
|
{
|
|
215
|
-
when: ( ContextKeyExpr.and(
|
|
200
|
+
when: ( (ContextKeyExpr.and(
|
|
201
|
+
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
202
|
+
CTX_INLINE_CHAT_FOCUSED,
|
|
203
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
204
|
+
))),
|
|
216
205
|
weight: 100 + 10,
|
|
217
206
|
primary: 2048 | 3 ,
|
|
218
207
|
},
|
|
219
208
|
{
|
|
220
|
-
when: ( ContextKeyExpr.and(
|
|
209
|
+
when: ( (ContextKeyExpr.and(
|
|
221
210
|
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
222
211
|
CTX_INLINE_CHAT_FOCUSED,
|
|
223
212
|
CTX_NOTEBOOK_CHAT_USER_DID_EDIT,
|
|
224
|
-
|
|
225
|
-
)),
|
|
213
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
214
|
+
))),
|
|
226
215
|
weight: 0 + 10,
|
|
227
216
|
primary: 9
|
|
228
217
|
},
|
|
229
218
|
{
|
|
230
|
-
when: ( ContextKeyExpr.and(
|
|
219
|
+
when: ( (ContextKeyExpr.and(
|
|
231
220
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
232
221
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)),
|
|
222
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate()),
|
|
223
|
+
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('below'))
|
|
224
|
+
))),
|
|
236
225
|
primary: 2048 | 3 ,
|
|
237
226
|
weight: 200
|
|
238
227
|
}
|
|
@@ -242,7 +231,7 @@ registerAction2(class extends NotebookAction {
|
|
|
242
231
|
id: MENU_CELL_CHAT_WIDGET_STATUS,
|
|
243
232
|
group: 'inline',
|
|
244
233
|
order: 0,
|
|
245
|
-
when: ( CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo("onlyMessages" )),
|
|
234
|
+
when: ( (CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo("onlyMessages" ))),
|
|
246
235
|
}
|
|
247
236
|
]
|
|
248
237
|
});
|
|
@@ -255,14 +244,15 @@ registerAction2(class extends NotebookAction {
|
|
|
255
244
|
constructor() {
|
|
256
245
|
super({
|
|
257
246
|
id: 'notebook.cell.chat.discard',
|
|
258
|
-
title: ( localizeWithPath(
|
|
259
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
260
|
-
'discard',
|
|
261
|
-
'Discard'
|
|
262
|
-
)),
|
|
247
|
+
title: ( localizeWithPath(_moduleId, 10, 'Discard')),
|
|
263
248
|
icon: Codicon.discard,
|
|
264
249
|
keybinding: {
|
|
265
|
-
when: ( ContextKeyExpr.and(
|
|
250
|
+
when: ( (ContextKeyExpr.and(
|
|
251
|
+
CTX_NOTEBOOK_CELL_CHAT_FOCUSED,
|
|
252
|
+
CTX_INLINE_CHAT_FOCUSED,
|
|
253
|
+
(CTX_NOTEBOOK_CHAT_USER_DID_EDIT.negate()),
|
|
254
|
+
(NOTEBOOK_CELL_EDITOR_FOCUSED.negate())
|
|
255
|
+
))),
|
|
266
256
|
weight: 100 ,
|
|
267
257
|
primary: 9
|
|
268
258
|
},
|
|
@@ -281,17 +271,13 @@ registerAction2(class extends NotebookAction {
|
|
|
281
271
|
constructor() {
|
|
282
272
|
super({
|
|
283
273
|
id: 'notebook.cell.feedbackHelpful',
|
|
284
|
-
title: ( localizeWithPath(
|
|
285
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
286
|
-
'feedback.helpful',
|
|
287
|
-
'Helpful'
|
|
288
|
-
)),
|
|
274
|
+
title: ( localizeWithPath(_moduleId, 11, 'Helpful')),
|
|
289
275
|
icon: Codicon.thumbsup,
|
|
290
276
|
menu: {
|
|
291
277
|
id: MENU_CELL_CHAT_WIDGET_FEEDBACK,
|
|
292
278
|
group: 'inline',
|
|
293
279
|
order: 1,
|
|
294
|
-
when: ( CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined)),
|
|
280
|
+
when: ( (CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined))),
|
|
295
281
|
}
|
|
296
282
|
});
|
|
297
283
|
}
|
|
@@ -303,17 +289,13 @@ registerAction2(class extends NotebookAction {
|
|
|
303
289
|
constructor() {
|
|
304
290
|
super({
|
|
305
291
|
id: 'notebook.cell.feedbackUnhelpful',
|
|
306
|
-
title: ( localizeWithPath(
|
|
307
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
308
|
-
'feedback.unhelpful',
|
|
309
|
-
'Unhelpful'
|
|
310
|
-
)),
|
|
292
|
+
title: ( localizeWithPath(_moduleId, 12, 'Unhelpful')),
|
|
311
293
|
icon: Codicon.thumbsdown,
|
|
312
294
|
menu: {
|
|
313
295
|
id: MENU_CELL_CHAT_WIDGET_FEEDBACK,
|
|
314
296
|
group: 'inline',
|
|
315
297
|
order: 2,
|
|
316
|
-
when: ( CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined)),
|
|
298
|
+
when: ( (CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined))),
|
|
317
299
|
}
|
|
318
300
|
});
|
|
319
301
|
}
|
|
@@ -325,17 +307,13 @@ registerAction2(class extends NotebookAction {
|
|
|
325
307
|
constructor() {
|
|
326
308
|
super({
|
|
327
309
|
id: 'notebook.cell.reportIssueForBug',
|
|
328
|
-
title: ( localizeWithPath(
|
|
329
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
330
|
-
'feedback.reportIssueForBug',
|
|
331
|
-
'Report Issue'
|
|
332
|
-
)),
|
|
310
|
+
title: ( localizeWithPath(_moduleId, 13, 'Report Issue')),
|
|
333
311
|
icon: Codicon.report,
|
|
334
312
|
menu: {
|
|
335
313
|
id: MENU_CELL_CHAT_WIDGET_FEEDBACK,
|
|
336
314
|
group: 'inline',
|
|
337
315
|
order: 3,
|
|
338
|
-
when: ( CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined)),
|
|
316
|
+
when: ( (CTX_INLINE_CHAT_LAST_RESPONSE_TYPE.notEqualsTo(undefined))),
|
|
339
317
|
}
|
|
340
318
|
});
|
|
341
319
|
}
|
|
@@ -348,24 +326,12 @@ registerAction2(class extends NotebookAction {
|
|
|
348
326
|
super({
|
|
349
327
|
id: 'notebook.cell.chat.start',
|
|
350
328
|
title: {
|
|
351
|
-
value: '$(sparkle) ' + ( localizeWithPath(
|
|
352
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
353
|
-
'notebookActions.menu.insertCodeCellWithChat',
|
|
354
|
-
"Generate"
|
|
355
|
-
)),
|
|
329
|
+
value: '$(sparkle) ' + ( localizeWithPath(_moduleId, 14, "Generate")),
|
|
356
330
|
original: '$(sparkle) Generate',
|
|
357
331
|
},
|
|
358
|
-
tooltip: ( localizeWithPath(
|
|
359
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
360
|
-
'notebookActions.menu.insertCodeCellWithChat.tooltip',
|
|
361
|
-
"Start Chat to Generate Code"
|
|
362
|
-
)),
|
|
332
|
+
tooltip: ( localizeWithPath(_moduleId, 15, "Start Chat to Generate Code")),
|
|
363
333
|
metadata: {
|
|
364
|
-
description: ( localizeWithPath(
|
|
365
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
366
|
-
'notebookActions.menu.insertCodeCellWithChat.tooltip',
|
|
367
|
-
"Start Chat to Generate Code"
|
|
368
|
-
)),
|
|
334
|
+
description: ( localizeWithPath(_moduleId, 15, "Start Chat to Generate Code")),
|
|
369
335
|
args: [
|
|
370
336
|
{
|
|
371
337
|
name: 'args',
|
|
@@ -389,7 +355,13 @@ registerAction2(class extends NotebookAction {
|
|
|
389
355
|
},
|
|
390
356
|
f1: false,
|
|
391
357
|
keybinding: {
|
|
392
|
-
when: ( ContextKeyExpr.and(
|
|
358
|
+
when: ( (ContextKeyExpr.and(
|
|
359
|
+
NOTEBOOK_EDITOR_FOCUSED,
|
|
360
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
361
|
+
ContextKeyExpr.not(InputFocusedContextKey),
|
|
362
|
+
CTX_INLINE_CHAT_HAS_PROVIDER,
|
|
363
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
|
|
364
|
+
))),
|
|
393
365
|
weight: 200 ,
|
|
394
366
|
primary: 2048 | 39 ,
|
|
395
367
|
secondary: [KeyChord(2048 | 41 , 39 )],
|
|
@@ -399,7 +371,11 @@ registerAction2(class extends NotebookAction {
|
|
|
399
371
|
id: MenuId.NotebookCellBetween,
|
|
400
372
|
group: 'inline',
|
|
401
373
|
order: -1,
|
|
402
|
-
when: ( ContextKeyExpr.and(
|
|
374
|
+
when: ( (ContextKeyExpr.and(
|
|
375
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
376
|
+
CTX_INLINE_CHAT_HAS_PROVIDER,
|
|
377
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
|
|
378
|
+
)))
|
|
403
379
|
}
|
|
404
380
|
]
|
|
405
381
|
});
|
|
@@ -448,25 +424,21 @@ registerAction2(class extends NotebookAction {
|
|
|
448
424
|
super({
|
|
449
425
|
id: 'notebook.cell.chat.startAtTop',
|
|
450
426
|
title: {
|
|
451
|
-
value: '$(sparkle) ' + ( localizeWithPath(
|
|
452
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
453
|
-
'notebookActions.menu.insertCodeCellWithChat',
|
|
454
|
-
"Generate"
|
|
455
|
-
)),
|
|
427
|
+
value: '$(sparkle) ' + ( localizeWithPath(_moduleId, 14, "Generate")),
|
|
456
428
|
original: '$(sparkle) Generate',
|
|
457
429
|
},
|
|
458
|
-
tooltip: ( localizeWithPath(
|
|
459
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
460
|
-
'notebookActions.menu.insertCodeCellWithChat.tooltip',
|
|
461
|
-
"Start Chat to Generate Code"
|
|
462
|
-
)),
|
|
430
|
+
tooltip: ( localizeWithPath(_moduleId, 15, "Start Chat to Generate Code")),
|
|
463
431
|
f1: false,
|
|
464
432
|
menu: [
|
|
465
433
|
{
|
|
466
434
|
id: MenuId.NotebookCellListTop,
|
|
467
435
|
group: 'inline',
|
|
468
436
|
order: -1,
|
|
469
|
-
when: ( ContextKeyExpr.and(
|
|
437
|
+
when: ( (ContextKeyExpr.and(
|
|
438
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
439
|
+
CTX_INLINE_CHAT_HAS_PROVIDER,
|
|
440
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
|
|
441
|
+
)))
|
|
470
442
|
},
|
|
471
443
|
]
|
|
472
444
|
});
|
|
@@ -480,46 +452,40 @@ MenuRegistry.appendMenuItem(MenuId.NotebookToolbar, {
|
|
|
480
452
|
command: {
|
|
481
453
|
id: 'notebook.cell.chat.start',
|
|
482
454
|
icon: Codicon.sparkle,
|
|
483
|
-
title: ( localizeWithPath(
|
|
484
|
-
|
|
485
|
-
'notebookActions.menu.insertCode.ontoolbar',
|
|
486
|
-
"Generate"
|
|
487
|
-
)),
|
|
488
|
-
tooltip: ( localizeWithPath(
|
|
489
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
490
|
-
'notebookActions.menu.insertCode.tooltip',
|
|
491
|
-
"Start Chat to Generate Code"
|
|
492
|
-
))
|
|
455
|
+
title: ( localizeWithPath(_moduleId, 16, "Generate")),
|
|
456
|
+
tooltip: ( localizeWithPath(_moduleId, 17, "Start Chat to Generate Code"))
|
|
493
457
|
},
|
|
494
458
|
order: -10,
|
|
495
459
|
group: 'navigation/add',
|
|
496
|
-
when: ( ContextKeyExpr.and(
|
|
460
|
+
when: ( (ContextKeyExpr.and(
|
|
461
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
462
|
+
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'betweenCells')),
|
|
463
|
+
(ContextKeyExpr.notEquals('config.notebook.insertToolbarLocation', 'hidden')),
|
|
464
|
+
CTX_INLINE_CHAT_HAS_PROVIDER,
|
|
465
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
|
|
466
|
+
)))
|
|
497
467
|
});
|
|
498
468
|
registerAction2(class extends NotebookAction {
|
|
499
469
|
constructor() {
|
|
500
470
|
super({
|
|
501
471
|
id: 'notebook.cell.chat.focus',
|
|
502
|
-
title: ( localizeWithPath(
|
|
503
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
504
|
-
'focusNotebookChat',
|
|
505
|
-
'Focus Chat'
|
|
506
|
-
)),
|
|
472
|
+
title: ( localizeWithPath(_moduleId, 18, 'Focus Chat')),
|
|
507
473
|
keybinding: [
|
|
508
474
|
{
|
|
509
|
-
when: ( ContextKeyExpr.and(
|
|
475
|
+
when: ( (ContextKeyExpr.and(
|
|
510
476
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
511
477
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
512
|
-
|
|
513
|
-
)),
|
|
478
|
+
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('above'))
|
|
479
|
+
))),
|
|
514
480
|
primary: 2048 | 18 ,
|
|
515
481
|
weight: 200
|
|
516
482
|
},
|
|
517
483
|
{
|
|
518
|
-
when: ( ContextKeyExpr.and(
|
|
484
|
+
when: ( (ContextKeyExpr.and(
|
|
519
485
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
520
486
|
ContextKeyExpr.not(InputFocusedContextKey),
|
|
521
|
-
|
|
522
|
-
)),
|
|
487
|
+
(CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION.isEqualTo('below'))
|
|
488
|
+
))),
|
|
523
489
|
primary: 2048 | 16 ,
|
|
524
490
|
weight: 200
|
|
525
491
|
}
|
|
@@ -534,14 +500,10 @@ registerAction2(class extends NotebookAction {
|
|
|
534
500
|
constructor() {
|
|
535
501
|
super({
|
|
536
502
|
id: 'notebook.cell.chat.focusNextCell',
|
|
537
|
-
title: ( localizeWithPath(
|
|
538
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
539
|
-
'focusNextCell',
|
|
540
|
-
'Focus Next Cell'
|
|
541
|
-
)),
|
|
503
|
+
title: ( localizeWithPath(_moduleId, 19, 'Focus Next Cell')),
|
|
542
504
|
keybinding: [
|
|
543
505
|
{
|
|
544
|
-
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
506
|
+
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
545
507
|
primary: 2048 | 18 ,
|
|
546
508
|
weight: 200
|
|
547
509
|
}
|
|
@@ -556,14 +518,10 @@ registerAction2(class extends NotebookAction {
|
|
|
556
518
|
constructor() {
|
|
557
519
|
super({
|
|
558
520
|
id: 'notebook.cell.chat.focusPreviousCell',
|
|
559
|
-
title: ( localizeWithPath(
|
|
560
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
561
|
-
'focusPreviousCell',
|
|
562
|
-
'Focus Previous Cell'
|
|
563
|
-
)),
|
|
521
|
+
title: ( localizeWithPath(_moduleId, 20, 'Focus Previous Cell')),
|
|
564
522
|
keybinding: [
|
|
565
523
|
{
|
|
566
|
-
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
524
|
+
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
567
525
|
primary: 2048 | 16 ,
|
|
568
526
|
weight: 200
|
|
569
527
|
}
|
|
@@ -578,14 +536,10 @@ registerAction2(class extends NotebookAction {
|
|
|
578
536
|
constructor() {
|
|
579
537
|
super({
|
|
580
538
|
id: 'notebook.cell.chat.previousFromHistory',
|
|
581
|
-
title: ( localize2WithPath(
|
|
582
|
-
|
|
583
|
-
'notebook.cell.chat.previousFromHistory',
|
|
584
|
-
"Previous From History"
|
|
585
|
-
)),
|
|
586
|
-
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
539
|
+
title: ( localize2WithPath(_moduleId, 21, "Previous From History")),
|
|
540
|
+
precondition: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
587
541
|
keybinding: {
|
|
588
|
-
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
542
|
+
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
589
543
|
weight: 0 + 10,
|
|
590
544
|
primary: 16 ,
|
|
591
545
|
}
|
|
@@ -599,14 +553,10 @@ registerAction2(class extends NotebookAction {
|
|
|
599
553
|
constructor() {
|
|
600
554
|
super({
|
|
601
555
|
id: 'notebook.cell.chat.nextFromHistory',
|
|
602
|
-
title: ( localize2WithPath(
|
|
603
|
-
|
|
604
|
-
'notebook.cell.chat.nextFromHistory',
|
|
605
|
-
"Next From History"
|
|
606
|
-
)),
|
|
607
|
-
precondition: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
556
|
+
title: ( localize2WithPath(_moduleId, 22, "Next From History")),
|
|
557
|
+
precondition: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
608
558
|
keybinding: {
|
|
609
|
-
when: ( ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED)),
|
|
559
|
+
when: ( (ContextKeyExpr.and(CTX_NOTEBOOK_CELL_CHAT_FOCUSED, CTX_INLINE_CHAT_FOCUSED))),
|
|
610
560
|
weight: 0 + 10,
|
|
611
561
|
primary: 18
|
|
612
562
|
}
|
|
@@ -620,17 +570,18 @@ registerAction2(class extends NotebookCellAction {
|
|
|
620
570
|
constructor() {
|
|
621
571
|
super({
|
|
622
572
|
id: 'notebook.cell.chat.restore',
|
|
623
|
-
title: ( localize2WithPath(
|
|
624
|
-
'vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions',
|
|
625
|
-
'notebookActions.restoreCellprompt',
|
|
626
|
-
"Generate"
|
|
627
|
-
)),
|
|
573
|
+
title: ( localize2WithPath(_moduleId, 23, "Generate")),
|
|
628
574
|
icon: Codicon.sparkle,
|
|
629
575
|
menu: {
|
|
630
576
|
id: MenuId.NotebookCellTitle,
|
|
631
577
|
group: CELL_TITLE_CELL_GROUP_ID,
|
|
632
578
|
order: 0,
|
|
633
|
-
when: ( ContextKeyExpr.and(
|
|
579
|
+
when: ( (ContextKeyExpr.and(
|
|
580
|
+
(NOTEBOOK_EDITOR_EDITABLE.isEqualTo(true)),
|
|
581
|
+
CTX_INLINE_CHAT_HAS_PROVIDER,
|
|
582
|
+
NOTEBOOK_CELL_GENERATED_BY_CHAT,
|
|
583
|
+
(ContextKeyExpr.equals(`config.${NotebookSetting.cellChat}`, true))
|
|
584
|
+
)))
|
|
634
585
|
}
|
|
635
586
|
});
|
|
636
587
|
}
|