@codingame/monaco-vscode-notebook-service-override 9.0.2 → 10.0.0
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 +16 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +62 -63
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +4 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +8 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +35 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +16 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +17 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +15 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +4 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +319 -67
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +64 -61
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +10 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +48 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +35 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +45 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +124 -71
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +179 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +52 -55
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +30 -32
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +28 -30
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +17 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +20 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +126 -46
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +171 -83
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +19 -19
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +5 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +7 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +3 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +13 -21
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +90 -39
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +3 -5
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +40 -31
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +10 -11
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +29 -55
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +15 -17
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +12 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +2 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -33
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js
CHANGED
|
@@ -10,11 +10,10 @@ import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
|
10
10
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
11
11
|
import { CHANGE_CELL_LANGUAGE, DETECT_CELL_LANGUAGE } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
12
12
|
import { INotebookCellStatusBarService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.service';
|
|
13
|
-
import { CellKind
|
|
13
|
+
import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
14
14
|
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
15
15
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
16
16
|
import { ILanguageDetectionService } from 'vscode/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.service';
|
|
17
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
18
17
|
|
|
19
18
|
let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvider {
|
|
20
19
|
constructor(_notebookService, _languageService) {
|
|
@@ -40,7 +39,7 @@ let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvi
|
|
|
40
39
|
}
|
|
41
40
|
else {
|
|
42
41
|
const searchTooltip = ( localize(
|
|
43
|
-
|
|
42
|
+
8068,
|
|
44
43
|
"Unknown cell language. Click to search for '{0}' extensions",
|
|
45
44
|
cell.language
|
|
46
45
|
));
|
|
@@ -48,7 +47,7 @@ let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvi
|
|
|
48
47
|
text: `$(dialog-warning)`,
|
|
49
48
|
command: { id: 'workbench.extensions.search', arguments: [`@tag:${cell.language}`], title: 'Search Extensions' },
|
|
50
49
|
tooltip: searchTooltip,
|
|
51
|
-
alignment:
|
|
50
|
+
alignment: 2 ,
|
|
52
51
|
priority: -Number.MAX_SAFE_INTEGER + 1
|
|
53
52
|
});
|
|
54
53
|
}
|
|
@@ -56,8 +55,8 @@ let CellStatusBarLanguagePickerProvider = class CellStatusBarLanguagePickerProvi
|
|
|
56
55
|
statusBarItems.push({
|
|
57
56
|
text: displayLanguage,
|
|
58
57
|
command: CHANGE_CELL_LANGUAGE,
|
|
59
|
-
tooltip: ( localize(
|
|
60
|
-
alignment:
|
|
58
|
+
tooltip: ( localize(8069, "Select Cell Language Mode")),
|
|
59
|
+
alignment: 2 ,
|
|
61
60
|
priority: -Number.MAX_SAFE_INTEGER
|
|
62
61
|
});
|
|
63
62
|
return {
|
|
@@ -120,7 +119,7 @@ let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectio
|
|
|
120
119
|
const items = [];
|
|
121
120
|
if (cached.guess && currentLanguageId !== cached.guess) {
|
|
122
121
|
const detectedName = this._languageService.getLanguageName(cached.guess) || cached.guess;
|
|
123
|
-
let tooltip = ( localize(
|
|
122
|
+
let tooltip = ( localize(8070, "Accept Detected Language: {0}", detectedName));
|
|
124
123
|
const keybinding = this._keybindingService.lookupKeybinding(DETECT_CELL_LANGUAGE);
|
|
125
124
|
const label = keybinding?.getLabel();
|
|
126
125
|
if (label) {
|
|
@@ -130,7 +129,7 @@ let CellStatusBarLanguageDetectionProvider = class CellStatusBarLanguageDetectio
|
|
|
130
129
|
text: '$(lightbulb-autofix)',
|
|
131
130
|
command: DETECT_CELL_LANGUAGE,
|
|
132
131
|
tooltip,
|
|
133
|
-
alignment:
|
|
132
|
+
alignment: 2 ,
|
|
134
133
|
priority: -Number.MAX_SAFE_INTEGER + 1
|
|
135
134
|
});
|
|
136
135
|
}
|
|
@@ -161,4 +160,4 @@ BuiltinCellStatusBarProviders = ( (__decorate([
|
|
|
161
160
|
( (__param(0, IInstantiationService))),
|
|
162
161
|
( (__param(1, INotebookCellStatusBarService)))
|
|
163
162
|
], BuiltinCellStatusBarProviders)));
|
|
164
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(BuiltinCellStatusBarProviders,
|
|
163
|
+
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(BuiltinCellStatusBarProviders, 3 );
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localize, localize2 } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { registerWorkbenchContribution2
|
|
4
|
+
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
5
5
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
6
6
|
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_OUTPUT_FOCUSED } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
7
7
|
import { getNotebookEditorFromEditorPane, expandCellRangesWithHiddenCells, cellRangeToViewCells } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
8
8
|
import { CopyAction, PasteAction, CutAction } from 'vscode/vscode/vs/editor/contrib/clipboard/browser/clipboard';
|
|
9
9
|
import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
10
10
|
import { cloneNotebookCellTextModel } from 'vscode/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
|
11
|
-
import { SelectionStateType
|
|
11
|
+
import { SelectionStateType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
13
13
|
import { isNative } from 'vscode/vscode/vs/base/common/platform';
|
|
14
14
|
import { registerAction2, MenuId, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
15
|
-
import { NotebookCellAction,
|
|
16
|
-
import { KeyMod, KeyCode } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
15
|
+
import { NotebookCellAction, NotebookAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
17
16
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
18
17
|
import { InputFocusedContextKey } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
19
|
-
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
20
18
|
import { UndoCommand, RedoCommand } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
21
19
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
22
20
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
23
21
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
24
22
|
import { showWindowLogActionId } from 'vscode/vscode/vs/workbench/services/log/common/logConstants';
|
|
25
|
-
import { getWindow, getActiveElement, isHTMLElement, isAncestor } from 'vscode/vscode/vs/base/browser/dom';
|
|
23
|
+
import { getWindow, getActiveElement, isHTMLElement, isEditableElement, isAncestor } from 'vscode/vscode/vs/base/browser/dom';
|
|
26
24
|
|
|
27
25
|
let _logging = false;
|
|
28
26
|
function toggleLogging() {
|
|
@@ -110,7 +108,7 @@ function runPasteCells(editor, activeCell, pasteCells) {
|
|
|
110
108
|
const newFocusIndex = typeof currCellIndex === 'number' ? currCellIndex + 1 : 0;
|
|
111
109
|
textModel.applyEdits([
|
|
112
110
|
{
|
|
113
|
-
editType:
|
|
111
|
+
editType: 1 ,
|
|
114
112
|
index: newFocusIndex,
|
|
115
113
|
count: 0,
|
|
116
114
|
cells: ( (pasteCells.items.map(cell => cloneNotebookCellTextModel(cell))))
|
|
@@ -127,7 +125,7 @@ function runPasteCells(editor, activeCell, pasteCells) {
|
|
|
127
125
|
}
|
|
128
126
|
textModel.applyEdits([
|
|
129
127
|
{
|
|
130
|
-
editType:
|
|
128
|
+
editType: 1 ,
|
|
131
129
|
index: 0,
|
|
132
130
|
count: 0,
|
|
133
131
|
cells: ( (pasteCells.items.map(cell => cloneNotebookCellTextModel(cell))))
|
|
@@ -188,7 +186,7 @@ function runCutCells(accessor, editor, targetCell) {
|
|
|
188
186
|
selection => (selection.end <= targetCellIndex ? selection : { start: selection.start - 1, end: selection.end - 1 })
|
|
189
187
|
)));
|
|
190
188
|
textModel.applyEdits([
|
|
191
|
-
{ editType:
|
|
189
|
+
{ editType: 1 , index: targetCellIndex, count: 1, cells: [] }
|
|
192
190
|
], true, { kind: SelectionStateType.Index, focus: editor.getFocus(), selections: selections }, () => ({ kind: SelectionStateType.Index, focus: newFocus, selections: newSelections }), undefined, true);
|
|
193
191
|
notebookService.setToCopy([targetCell.model], false);
|
|
194
192
|
return true;
|
|
@@ -204,7 +202,7 @@ function runCutCells(accessor, editor, targetCell) {
|
|
|
204
202
|
selection => (selection.end <= focus.start ? selection : { start: selection.start - 1, end: selection.end - 1 })
|
|
205
203
|
)));
|
|
206
204
|
textModel.applyEdits([
|
|
207
|
-
{ editType:
|
|
205
|
+
{ editType: 1 , index: focus.start, count: 1, cells: [] }
|
|
208
206
|
], true, { kind: SelectionStateType.Index, focus: editor.getFocus(), selections: selections }, () => ({ kind: SelectionStateType.Index, focus: newFocus, selections: newSelections }), undefined, true);
|
|
209
207
|
notebookService.setToCopy([targetCell.model], false);
|
|
210
208
|
return true;
|
|
@@ -216,7 +214,7 @@ function runCutCells(accessor, editor, targetCell) {
|
|
|
216
214
|
}
|
|
217
215
|
clipboardService.writeText(( (selectedCells.map(cell => cell.getText()))).join('\n'));
|
|
218
216
|
const edits = ( (selectionRanges.map(
|
|
219
|
-
range => ({ editType:
|
|
217
|
+
range => ({ editType: 1 , index: range.start, count: range.end - range.start, cells: [] })
|
|
220
218
|
)));
|
|
221
219
|
const firstSelectIndex = selectionRanges[0].start;
|
|
222
220
|
const newFocusedCellIndex = firstSelectIndex < textModel.cells.length - 1
|
|
@@ -289,7 +287,7 @@ let NotebookClipboardContribution = class NotebookClipboardContribution extends
|
|
|
289
287
|
runCopyAction(accessor) {
|
|
290
288
|
const loggerService = accessor.get(ILogService);
|
|
291
289
|
const activeElement = getActiveElement();
|
|
292
|
-
if (isHTMLElement(activeElement) &&
|
|
290
|
+
if (isHTMLElement(activeElement) && isEditableElement(activeElement)) {
|
|
293
291
|
_log(loggerService, '[NotebookEditor] focus is on input or textarea element, bypass');
|
|
294
292
|
return false;
|
|
295
293
|
}
|
|
@@ -311,7 +309,7 @@ let NotebookClipboardContribution = class NotebookClipboardContribution extends
|
|
|
311
309
|
}
|
|
312
310
|
runPasteAction(accessor) {
|
|
313
311
|
const activeElement = getActiveElement();
|
|
314
|
-
if (activeElement &&
|
|
312
|
+
if (activeElement && isEditableElement(activeElement)) {
|
|
315
313
|
return false;
|
|
316
314
|
}
|
|
317
315
|
const notebookService = accessor.get(INotebookService);
|
|
@@ -327,7 +325,7 @@ let NotebookClipboardContribution = class NotebookClipboardContribution extends
|
|
|
327
325
|
}
|
|
328
326
|
runCutAction(accessor) {
|
|
329
327
|
const activeElement = getActiveElement();
|
|
330
|
-
if (activeElement &&
|
|
328
|
+
if (activeElement && isEditableElement(activeElement)) {
|
|
331
329
|
return false;
|
|
332
330
|
}
|
|
333
331
|
const { editor } = this._getContext();
|
|
@@ -340,7 +338,7 @@ let NotebookClipboardContribution = class NotebookClipboardContribution extends
|
|
|
340
338
|
NotebookClipboardContribution = ( (__decorate([
|
|
341
339
|
( (__param(0, IEditorService)))
|
|
342
340
|
], NotebookClipboardContribution)));
|
|
343
|
-
registerWorkbenchContribution2(NotebookClipboardContribution.ID, NotebookClipboardContribution,
|
|
341
|
+
registerWorkbenchContribution2(NotebookClipboardContribution.ID, NotebookClipboardContribution, 2 );
|
|
344
342
|
const COPY_CELL_COMMAND_ID = 'notebook.cell.copy';
|
|
345
343
|
const CUT_CELL_COMMAND_ID = 'notebook.cell.cut';
|
|
346
344
|
const PASTE_CELL_COMMAND_ID = 'notebook.cell.paste';
|
|
@@ -349,18 +347,18 @@ registerAction2(class extends NotebookCellAction {
|
|
|
349
347
|
constructor() {
|
|
350
348
|
super({
|
|
351
349
|
id: COPY_CELL_COMMAND_ID,
|
|
352
|
-
title: ( localize(
|
|
350
|
+
title: ( localize(8021, "Copy Cell")),
|
|
353
351
|
menu: {
|
|
354
352
|
id: MenuId.NotebookCellTitle,
|
|
355
353
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
356
|
-
group:
|
|
354
|
+
group: "1_copy" ,
|
|
357
355
|
order: 2,
|
|
358
356
|
},
|
|
359
357
|
keybinding: isNative ? undefined : {
|
|
360
|
-
primary:
|
|
361
|
-
win: { primary:
|
|
358
|
+
primary: 2048 | 33 ,
|
|
359
|
+
win: { primary: 2048 | 33 , secondary: [2048 | 19 ] },
|
|
362
360
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
363
|
-
weight:
|
|
361
|
+
weight: 200
|
|
364
362
|
}
|
|
365
363
|
});
|
|
366
364
|
}
|
|
@@ -372,18 +370,18 @@ registerAction2(class extends NotebookCellAction {
|
|
|
372
370
|
constructor() {
|
|
373
371
|
super({
|
|
374
372
|
id: CUT_CELL_COMMAND_ID,
|
|
375
|
-
title: ( localize(
|
|
373
|
+
title: ( localize(8022, "Cut Cell")),
|
|
376
374
|
menu: {
|
|
377
375
|
id: MenuId.NotebookCellTitle,
|
|
378
376
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE))),
|
|
379
|
-
group:
|
|
377
|
+
group: "1_copy" ,
|
|
380
378
|
order: 1,
|
|
381
379
|
},
|
|
382
380
|
keybinding: isNative ? undefined : {
|
|
383
381
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
384
|
-
primary:
|
|
385
|
-
win: { primary:
|
|
386
|
-
weight:
|
|
382
|
+
primary: 2048 | 54 ,
|
|
383
|
+
win: { primary: 2048 | 54 , secondary: [1024 | 20 ] },
|
|
384
|
+
weight: 200
|
|
387
385
|
}
|
|
388
386
|
});
|
|
389
387
|
}
|
|
@@ -395,19 +393,19 @@ registerAction2(class extends NotebookAction {
|
|
|
395
393
|
constructor() {
|
|
396
394
|
super({
|
|
397
395
|
id: PASTE_CELL_COMMAND_ID,
|
|
398
|
-
title: ( localize(
|
|
396
|
+
title: ( localize(8023, "Paste Cell")),
|
|
399
397
|
menu: {
|
|
400
398
|
id: MenuId.NotebookCellTitle,
|
|
401
399
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE))),
|
|
402
|
-
group:
|
|
400
|
+
group: "1_copy" ,
|
|
403
401
|
order: 3,
|
|
404
402
|
},
|
|
405
403
|
keybinding: isNative ? undefined : {
|
|
406
404
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
407
|
-
primary:
|
|
408
|
-
win: { primary:
|
|
409
|
-
linux: { primary:
|
|
410
|
-
weight:
|
|
405
|
+
primary: 2048 | 52 ,
|
|
406
|
+
win: { primary: 2048 | 52 , secondary: [1024 | 19 ] },
|
|
407
|
+
linux: { primary: 2048 | 52 , secondary: [1024 | 19 ] },
|
|
408
|
+
weight: 100
|
|
411
409
|
}
|
|
412
410
|
});
|
|
413
411
|
}
|
|
@@ -427,10 +425,10 @@ registerAction2(class extends NotebookCellAction {
|
|
|
427
425
|
constructor() {
|
|
428
426
|
super({
|
|
429
427
|
id: PASTE_CELL_ABOVE_COMMAND_ID,
|
|
430
|
-
title: ( localize(
|
|
428
|
+
title: ( localize(8024, "Paste Cell Above")),
|
|
431
429
|
keybinding: {
|
|
432
430
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)))),
|
|
433
|
-
primary:
|
|
431
|
+
primary: 2048 | 1024 | 52 ,
|
|
434
432
|
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
435
433
|
},
|
|
436
434
|
});
|
|
@@ -455,7 +453,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
455
453
|
const newFocusIndex = currCellIndex;
|
|
456
454
|
textModel.applyEdits([
|
|
457
455
|
{
|
|
458
|
-
editType:
|
|
456
|
+
editType: 1 ,
|
|
459
457
|
index: currCellIndex,
|
|
460
458
|
count: 0,
|
|
461
459
|
cells: ( (pasteCells.items.map(cell => cloneNotebookCellTextModel(cell))))
|
|
@@ -471,7 +469,7 @@ registerAction2(class extends Action2 {
|
|
|
471
469
|
constructor() {
|
|
472
470
|
super({
|
|
473
471
|
id: 'workbench.action.toggleNotebookClipboardLog',
|
|
474
|
-
title: ( localize2(
|
|
472
|
+
title: ( localize2(8025, 'Toggle Notebook Clipboard Troubleshooting')),
|
|
475
473
|
category: Categories.Developer,
|
|
476
474
|
f1: true
|
|
477
475
|
});
|
|
@@ -488,9 +486,9 @@ registerAction2(class extends NotebookCellAction {
|
|
|
488
486
|
constructor() {
|
|
489
487
|
super({
|
|
490
488
|
id: 'notebook.cell.output.selectAll',
|
|
491
|
-
title: ( localize(
|
|
489
|
+
title: ( localize(8026, "Select All")),
|
|
492
490
|
keybinding: {
|
|
493
|
-
primary:
|
|
491
|
+
primary: 2048 | 31 ,
|
|
494
492
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED))),
|
|
495
493
|
weight: NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT
|
|
496
494
|
}
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js
CHANGED
|
@@ -10,7 +10,6 @@ import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/cont
|
|
|
10
10
|
import { NotebookCellsChangeType, CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
11
11
|
import { INotebookService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
12
12
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
13
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
14
13
|
|
|
15
14
|
let NotebookBreakpoints = class NotebookBreakpoints extends Disposable {
|
|
16
15
|
constructor(_debugService, _notebookService, _editorService) {
|
|
@@ -104,4 +103,4 @@ NotebookBreakpoints = ( __decorate([
|
|
|
104
103
|
( __param(1, INotebookService)),
|
|
105
104
|
( __param(2, IEditorService))
|
|
106
105
|
], NotebookBreakpoints));
|
|
107
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookBreakpoints,
|
|
106
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookBreakpoints, 3 );
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js
CHANGED
|
@@ -8,7 +8,6 @@ import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/d
|
|
|
8
8
|
import { CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
9
9
|
import { CellExecutionUpdateType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService';
|
|
10
10
|
import { INotebookExecutionStateService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
11
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
12
11
|
|
|
13
12
|
let NotebookCellPausing = class NotebookCellPausing extends Disposable {
|
|
14
13
|
constructor(_debugService, _notebookExecutionStateService) {
|
|
@@ -65,4 +64,4 @@ NotebookCellPausing = ( __decorate([
|
|
|
65
64
|
( __param(0, IDebugService)),
|
|
66
65
|
( __param(1, INotebookExecutionStateService))
|
|
67
66
|
], NotebookCellPausing));
|
|
68
|
-
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookCellPausing,
|
|
67
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(NotebookCellPausing, 3 );
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
3
|
-
import { registerEditorContribution
|
|
3
|
+
import { registerEditorContribution } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
4
4
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
5
5
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
6
|
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
@@ -66,6 +66,6 @@ EmptyCellEditorHintContribution = ( __decorate([
|
|
|
66
66
|
( __param(10, IProductService)),
|
|
67
67
|
( __param(11, IContextMenuService))
|
|
68
68
|
], EmptyCellEditorHintContribution));
|
|
69
|
-
registerEditorContribution(EmptyCellEditorHintContribution.CONTRIB_ID, EmptyCellEditorHintContribution,
|
|
69
|
+
registerEditorContribution(EmptyCellEditorHintContribution.CONTRIB_ID, EmptyCellEditorHintContribution, 0 );
|
|
70
70
|
|
|
71
71
|
export { EmptyCellEditorHintContribution };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js
CHANGED
|
@@ -6,7 +6,7 @@ import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/service
|
|
|
6
6
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
7
7
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
9
|
-
import { registerWorkbenchContribution2
|
|
9
|
+
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
10
10
|
import { CENTER_ACTIVE_CELL } from '../navigation/arrow.js';
|
|
11
11
|
import { SELECT_KERNEL_ID } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
12
12
|
import { SELECT_NOTEBOOK_INDENTATION_ID } from '../../controller/editActions.js';
|
|
@@ -14,7 +14,6 @@ import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/cont
|
|
|
14
14
|
import { NotebookCellsChangeType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
15
15
|
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
16
16
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
|
-
import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
18
17
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
19
18
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
20
19
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
@@ -110,22 +109,22 @@ let KernelStatus = class KernelStatus extends Disposable {
|
|
|
110
109
|
}
|
|
111
110
|
const tooltip = kernel.description ?? kernel.detail ?? kernel.label;
|
|
112
111
|
this._kernelInfoElement.add(this._statusbarService.addEntry({
|
|
113
|
-
name: ( localize(
|
|
112
|
+
name: ( localize(8077, "Notebook Kernel Info")),
|
|
114
113
|
text: `$(notebook-kernel-select) ${kernel.label}`,
|
|
115
114
|
ariaLabel: kernel.label,
|
|
116
|
-
tooltip: isSuggested ? ( localize(
|
|
115
|
+
tooltip: isSuggested ? ( localize(8078, "{0} (suggestion)", tooltip)) : tooltip,
|
|
117
116
|
command: SELECT_KERNEL_ID,
|
|
118
|
-
}, SELECT_KERNEL_ID,
|
|
117
|
+
}, SELECT_KERNEL_ID, 1 , 10));
|
|
119
118
|
this._kernelInfoElement.add(kernel.onDidChange(() => this._showKernelStatus(notebook)));
|
|
120
119
|
}
|
|
121
120
|
else {
|
|
122
121
|
this._kernelInfoElement.add(this._statusbarService.addEntry({
|
|
123
|
-
name: ( localize(
|
|
124
|
-
text: ( localize(
|
|
125
|
-
ariaLabel: ( localize(
|
|
122
|
+
name: ( localize(8079, "Notebook Kernel Selection")),
|
|
123
|
+
text: ( localize(8080, "Select Kernel")),
|
|
124
|
+
ariaLabel: ( localize(8080, "Select Kernel")),
|
|
126
125
|
command: SELECT_KERNEL_ID,
|
|
127
126
|
kind: 'prominent'
|
|
128
|
-
}, SELECT_KERNEL_ID,
|
|
127
|
+
}, SELECT_KERNEL_ID, 1 , 10));
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
};
|
|
@@ -167,13 +166,13 @@ let ActiveCellStatus = class ActiveCellStatus extends Disposable {
|
|
|
167
166
|
return;
|
|
168
167
|
}
|
|
169
168
|
const entry = {
|
|
170
|
-
name: ( localize(
|
|
169
|
+
name: ( localize(8081, "Notebook Editor Selections")),
|
|
171
170
|
text: newText,
|
|
172
171
|
ariaLabel: newText,
|
|
173
172
|
command: CENTER_ACTIVE_CELL
|
|
174
173
|
};
|
|
175
174
|
if (!this._accessor.value) {
|
|
176
|
-
this._accessor.value = this._statusbarService.addEntry(entry, 'notebook.activeCellStatus',
|
|
175
|
+
this._accessor.value = this._statusbarService.addEntry(entry, 'notebook.activeCellStatus', 1 , 100);
|
|
177
176
|
}
|
|
178
177
|
else {
|
|
179
178
|
this._accessor.value.update(entry);
|
|
@@ -191,8 +190,8 @@ let ActiveCellStatus = class ActiveCellStatus extends Disposable {
|
|
|
191
190
|
const numSelected = editor.getSelections().reduce((prev, range) => prev + (range.end - range.start), 0);
|
|
192
191
|
const totalCells = editor.getLength();
|
|
193
192
|
return numSelected > 1 ?
|
|
194
|
-
( localize(
|
|
195
|
-
( localize(
|
|
193
|
+
( localize(8082, "Cell {0} ({1} selected)", idxFocused, numSelected)) :
|
|
194
|
+
( localize(8083, "Cell {0} of {1}", idxFocused, totalCells));
|
|
196
195
|
}
|
|
197
196
|
};
|
|
198
197
|
ActiveCellStatus = ( (__decorate([
|
|
@@ -251,14 +250,14 @@ let NotebookIndentationStatus = class NotebookIndentationStatus extends Disposab
|
|
|
251
250
|
return;
|
|
252
251
|
}
|
|
253
252
|
const entry = {
|
|
254
|
-
name: ( localize(
|
|
253
|
+
name: ( localize(8084, "Notebook Indentation")),
|
|
255
254
|
text: newText,
|
|
256
255
|
ariaLabel: newText,
|
|
257
|
-
tooltip: ( localize(
|
|
256
|
+
tooltip: ( localize(8085, "Select Indentation")),
|
|
258
257
|
command: SELECT_NOTEBOOK_INDENTATION_ID
|
|
259
258
|
};
|
|
260
259
|
if (!this._accessor.value) {
|
|
261
|
-
this._accessor.value = this._statusbarService.addEntry(entry, 'notebook.status.indentation',
|
|
260
|
+
this._accessor.value = this._statusbarService.addEntry(entry, 'notebook.status.indentation', 1 , 100.4);
|
|
262
261
|
}
|
|
263
262
|
else {
|
|
264
263
|
this._accessor.value.update(entry);
|
|
@@ -292,6 +291,6 @@ let NotebookEditorStatusContribution = class NotebookEditorStatusContribution ex
|
|
|
292
291
|
NotebookEditorStatusContribution = ( (__decorate([
|
|
293
292
|
( (__param(0, IEditorGroupsService)))
|
|
294
293
|
], NotebookEditorStatusContribution)));
|
|
295
|
-
registerWorkbenchContribution2(NotebookEditorStatusContribution.ID, NotebookEditorStatusContribution,
|
|
294
|
+
registerWorkbenchContribution2(NotebookEditorStatusContribution.ID, NotebookEditorStatusContribution, 3 );
|
|
296
295
|
|
|
297
296
|
export { ActiveCellStatus, KernelStatus, NotebookEditorStatusContribution, NotebookIndentationStatus };
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import './media/notebookFind.css.js';
|
|
2
|
-
import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
3
2
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
4
3
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
5
4
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
6
|
-
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
7
5
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
8
|
-
import { getSelectionSearchString, StartFindAction,
|
|
6
|
+
import { getSelectionSearchString, StartFindAction, StartFindReplaceAction } from 'vscode/vscode/vs/editor/contrib/find/browser/findController';
|
|
9
7
|
import { localize2 } from 'vscode/vscode/vs/nls';
|
|
10
8
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
11
9
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
12
|
-
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
13
10
|
import { NotebookFindContrib } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget';
|
|
14
11
|
import { NotebookMultiCellAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
15
12
|
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
@@ -23,11 +20,11 @@ registerAction2(class extends Action2 {
|
|
|
23
20
|
constructor() {
|
|
24
21
|
super({
|
|
25
22
|
id: 'notebook.hideFind',
|
|
26
|
-
title: ( localize2(
|
|
23
|
+
title: ( localize2(8027, 'Hide Find in Notebook')),
|
|
27
24
|
keybinding: {
|
|
28
25
|
when: ( (ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED))),
|
|
29
|
-
primary:
|
|
30
|
-
weight:
|
|
26
|
+
primary: 9 ,
|
|
27
|
+
weight: 200
|
|
31
28
|
}
|
|
32
29
|
});
|
|
33
30
|
}
|
|
@@ -46,15 +43,15 @@ registerAction2(class extends NotebookMultiCellAction {
|
|
|
46
43
|
constructor() {
|
|
47
44
|
super({
|
|
48
45
|
id: 'notebook.find',
|
|
49
|
-
title: ( localize2(
|
|
46
|
+
title: ( localize2(8028, 'Find in Notebook')),
|
|
50
47
|
keybinding: {
|
|
51
48
|
when: ( (ContextKeyExpr.and(
|
|
52
49
|
NOTEBOOK_EDITOR_FOCUSED,
|
|
53
50
|
(ContextKeyExpr.or(NOTEBOOK_IS_ACTIVE_EDITOR, INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR)),
|
|
54
51
|
(EditorContextKeys.focus.toNegated())
|
|
55
52
|
))),
|
|
56
|
-
primary:
|
|
57
|
-
weight:
|
|
53
|
+
primary: 36 | 2048 ,
|
|
54
|
+
weight: 200
|
|
58
55
|
}
|
|
59
56
|
});
|
|
60
57
|
}
|
|
@@ -118,13 +115,13 @@ StartFindAction.addImplementation(100, (accessor, codeEditor, args) => {
|
|
|
118
115
|
const controller = editor.getContribution(NotebookFindContrib.id);
|
|
119
116
|
const searchStringOptions = getSearchStringOptions(codeEditor, {
|
|
120
117
|
forceRevealReplace: false,
|
|
121
|
-
seedSearchStringFromSelection: codeEditor.getOption(
|
|
122
|
-
seedSearchStringFromNonEmptySelection: codeEditor.getOption(
|
|
123
|
-
seedSearchStringFromGlobalClipboard: codeEditor.getOption(
|
|
124
|
-
shouldFocus:
|
|
118
|
+
seedSearchStringFromSelection: codeEditor.getOption(43 ).seedSearchStringFromSelection !== 'never' ? 'single' : 'none',
|
|
119
|
+
seedSearchStringFromNonEmptySelection: codeEditor.getOption(43 ).seedSearchStringFromSelection === 'selection',
|
|
120
|
+
seedSearchStringFromGlobalClipboard: codeEditor.getOption(43 ).globalFindClipboard,
|
|
121
|
+
shouldFocus: 1 ,
|
|
125
122
|
shouldAnimate: true,
|
|
126
123
|
updateSearchScope: false,
|
|
127
|
-
loop: codeEditor.getOption(
|
|
124
|
+
loop: codeEditor.getOption(43 ).loop
|
|
128
125
|
});
|
|
129
126
|
let options = undefined;
|
|
130
127
|
const uri = codeEditor.getModel().uri;
|
|
@@ -152,13 +149,13 @@ StartFindReplaceAction.addImplementation(100, (accessor, codeEditor, args) => {
|
|
|
152
149
|
const controller = editor.getContribution(NotebookFindContrib.id);
|
|
153
150
|
const searchStringOptions = getSearchStringOptions(codeEditor, {
|
|
154
151
|
forceRevealReplace: false,
|
|
155
|
-
seedSearchStringFromSelection: codeEditor.getOption(
|
|
156
|
-
seedSearchStringFromNonEmptySelection: codeEditor.getOption(
|
|
157
|
-
seedSearchStringFromGlobalClipboard: codeEditor.getOption(
|
|
158
|
-
shouldFocus:
|
|
152
|
+
seedSearchStringFromSelection: codeEditor.getOption(43 ).seedSearchStringFromSelection !== 'never' ? 'single' : 'none',
|
|
153
|
+
seedSearchStringFromNonEmptySelection: codeEditor.getOption(43 ).seedSearchStringFromSelection === 'selection',
|
|
154
|
+
seedSearchStringFromGlobalClipboard: codeEditor.getOption(43 ).globalFindClipboard,
|
|
155
|
+
shouldFocus: 1 ,
|
|
159
156
|
shouldAnimate: true,
|
|
160
157
|
updateSearchScope: false,
|
|
161
|
-
loop: codeEditor.getOption(
|
|
158
|
+
loop: codeEditor.getOption(43 ).loop
|
|
162
159
|
});
|
|
163
160
|
if (controller) {
|
|
164
161
|
controller.replace(searchStringOptions?.searchString);
|