@codingame/monaco-vscode-notebook-service-override 4.1.0 → 4.1.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/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/notebook.js +12 -12
- package/override/vs/platform/dialogs/common/dialogs.js +10 -0
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +391 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +109 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +173 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +544 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +106 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +165 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +320 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +72 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +168 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +209 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +84 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +82 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +67 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +101 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +393 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableContextKeys.js +5 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +97 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +120 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +60 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +150 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +656 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +77 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +517 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +159 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +56 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +94 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +652 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +721 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +351 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +315 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +199 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +47 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1297 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +284 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +563 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +115 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +313 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +911 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +395 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +185 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +1187 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +159 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +451 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +192 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +106 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +510 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +130 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +341 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +111 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookRendererMessagingServiceImpl.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +641 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +200 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +1002 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiffEditorInput.js +103 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +203 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +80 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +98 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.js +89 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +386 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +408 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +144 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopyManager.js +129 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
+
import { registerAction2, Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
3
|
+
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
|
+
import { NotebookOutlineContext } from '../contrib/outline/notebookOutline.js';
|
|
5
|
+
import { FoldingController } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/foldingController';
|
|
6
|
+
import { executeIcon } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
7
|
+
import { CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
8
|
+
|
|
9
|
+
class NotebookRunSingleCellInSection extends Action2 {
|
|
10
|
+
constructor() {
|
|
11
|
+
super({
|
|
12
|
+
id: 'notebook.section.runSingleCell',
|
|
13
|
+
title: {
|
|
14
|
+
...( localize2WithPath(
|
|
15
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
16
|
+
'runCell',
|
|
17
|
+
"Run Cell"
|
|
18
|
+
)),
|
|
19
|
+
mnemonicTitle: ( localizeWithPath(
|
|
20
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
21
|
+
{ key: 'mirunCell', comment: ['&& denotes a mnemonic'] },
|
|
22
|
+
"&&Run Cell"
|
|
23
|
+
)),
|
|
24
|
+
},
|
|
25
|
+
shortTitle: ( localizeWithPath(
|
|
26
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
27
|
+
'runCell',
|
|
28
|
+
"Run Cell"
|
|
29
|
+
)),
|
|
30
|
+
icon: executeIcon,
|
|
31
|
+
menu: [
|
|
32
|
+
{
|
|
33
|
+
id: MenuId.NotebookOutlineActionMenu,
|
|
34
|
+
group: 'inline',
|
|
35
|
+
order: 1,
|
|
36
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), ( NotebookOutlineContext.CellHasChildren.toNegated()), ( NotebookOutlineContext.CellHasHeader.toNegated())))
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async run(_accessor, context) {
|
|
42
|
+
if (!checkSectionContext(context)) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
context.notebookEditor.executeNotebookCells([context.outlineEntry.cell]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class NotebookRunCellsInSection extends Action2 {
|
|
49
|
+
constructor() {
|
|
50
|
+
super({
|
|
51
|
+
id: 'notebook.section.runCells',
|
|
52
|
+
title: {
|
|
53
|
+
...( localize2WithPath(
|
|
54
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
55
|
+
'runCellsInSection',
|
|
56
|
+
"Run Cells In Section"
|
|
57
|
+
)),
|
|
58
|
+
mnemonicTitle: ( localizeWithPath(
|
|
59
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
60
|
+
{ key: 'mirunCellsInSection', comment: ['&& denotes a mnemonic'] },
|
|
61
|
+
"&&Run Cells In Section"
|
|
62
|
+
)),
|
|
63
|
+
},
|
|
64
|
+
shortTitle: ( localizeWithPath(
|
|
65
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
66
|
+
'runCellsInSection',
|
|
67
|
+
"Run Cells In Section"
|
|
68
|
+
)),
|
|
69
|
+
menu: [
|
|
70
|
+
{
|
|
71
|
+
id: MenuId.NotebookStickyScrollContext,
|
|
72
|
+
group: 'notebookExecution',
|
|
73
|
+
order: 1
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: MenuId.NotebookOutlineActionMenu,
|
|
77
|
+
group: 'inline',
|
|
78
|
+
order: 1,
|
|
79
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader))
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
async run(_accessor, context) {
|
|
85
|
+
if (!checkSectionContext(context)) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const cell = context.outlineEntry.cell;
|
|
89
|
+
const idx = context.notebookEditor.getViewModel()?.getCellIndex(cell);
|
|
90
|
+
if (idx === undefined) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const length = context.notebookEditor.getViewModel()?.getFoldedLength(idx);
|
|
94
|
+
if (length === undefined) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const cells = context.notebookEditor.getCellsInRange({ start: idx, end: idx + length + 1 });
|
|
98
|
+
context.notebookEditor.executeNotebookCells(cells);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
class NotebookFoldSection extends Action2 {
|
|
102
|
+
constructor() {
|
|
103
|
+
super({
|
|
104
|
+
id: 'notebook.section.foldSection',
|
|
105
|
+
title: {
|
|
106
|
+
...( localize2WithPath(
|
|
107
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
108
|
+
'foldSection',
|
|
109
|
+
"Fold Section"
|
|
110
|
+
)),
|
|
111
|
+
mnemonicTitle: ( localizeWithPath(
|
|
112
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
113
|
+
{ key: 'mifoldSection', comment: ['&& denotes a mnemonic'] },
|
|
114
|
+
"&&Fold Section"
|
|
115
|
+
)),
|
|
116
|
+
},
|
|
117
|
+
shortTitle: ( localizeWithPath(
|
|
118
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
119
|
+
'foldSection',
|
|
120
|
+
"Fold Section"
|
|
121
|
+
)),
|
|
122
|
+
menu: [
|
|
123
|
+
{
|
|
124
|
+
id: MenuId.NotebookOutlineActionMenu,
|
|
125
|
+
group: 'notebookFolding',
|
|
126
|
+
order: 2,
|
|
127
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, ( NotebookOutlineContext.CellFoldingState.isEqualTo(1 ))))
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
async run(_accessor, context) {
|
|
133
|
+
if (!checkSectionContext(context)) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
this.toggleFoldRange(context.outlineEntry, context.notebookEditor);
|
|
137
|
+
}
|
|
138
|
+
toggleFoldRange(entry, notebookEditor) {
|
|
139
|
+
const foldingController = notebookEditor.getContribution(FoldingController.id);
|
|
140
|
+
const index = entry.index;
|
|
141
|
+
const headerLevel = entry.level;
|
|
142
|
+
const newFoldingState = 2 ;
|
|
143
|
+
foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
class NotebookExpandSection extends Action2 {
|
|
147
|
+
constructor() {
|
|
148
|
+
super({
|
|
149
|
+
id: 'notebook.section.expandSection',
|
|
150
|
+
title: {
|
|
151
|
+
...( localize2WithPath(
|
|
152
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
153
|
+
'expandSection',
|
|
154
|
+
"Expand Section"
|
|
155
|
+
)),
|
|
156
|
+
mnemonicTitle: ( localizeWithPath(
|
|
157
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
158
|
+
{ key: 'miexpandSection', comment: ['&& denotes a mnemonic'] },
|
|
159
|
+
"&&Expand Section"
|
|
160
|
+
)),
|
|
161
|
+
},
|
|
162
|
+
shortTitle: ( localizeWithPath(
|
|
163
|
+
'vs/workbench/contrib/notebook/browser/controller/sectionActions',
|
|
164
|
+
'expandSection',
|
|
165
|
+
"Expand Section"
|
|
166
|
+
)),
|
|
167
|
+
menu: [
|
|
168
|
+
{
|
|
169
|
+
id: MenuId.NotebookOutlineActionMenu,
|
|
170
|
+
group: 'notebookFolding',
|
|
171
|
+
order: 2,
|
|
172
|
+
when: ( ContextKeyExpr.and(( NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup)), ( NotebookOutlineContext.OutlineElementTarget.isEqualTo(1 )), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, ( NotebookOutlineContext.CellFoldingState.isEqualTo(2 ))))
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
async run(_accessor, context) {
|
|
178
|
+
if (!checkSectionContext(context)) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
this.toggleFoldRange(context.outlineEntry, context.notebookEditor);
|
|
182
|
+
}
|
|
183
|
+
toggleFoldRange(entry, notebookEditor) {
|
|
184
|
+
const foldingController = notebookEditor.getContribution(FoldingController.id);
|
|
185
|
+
const index = entry.index;
|
|
186
|
+
const headerLevel = entry.level;
|
|
187
|
+
const newFoldingState = 1 ;
|
|
188
|
+
foldingController.setFoldingStateDown(index, newFoldingState, headerLevel);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
function checkSectionContext(context) {
|
|
192
|
+
return !!(context && context.notebookEditor && context.outlineEntry);
|
|
193
|
+
}
|
|
194
|
+
registerAction2(NotebookRunSingleCellInSection);
|
|
195
|
+
registerAction2(NotebookRunCellsInSection);
|
|
196
|
+
registerAction2(NotebookFoldSection);
|
|
197
|
+
registerAction2(NotebookExpandSection);
|
|
198
|
+
|
|
199
|
+
export { NotebookExpandSection, NotebookFoldSection, NotebookRunCellsInSection, NotebookRunSingleCellInSection };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const fixedEditorPadding = {
|
|
2
|
+
top: 12,
|
|
3
|
+
bottom: 12
|
|
4
|
+
};
|
|
5
|
+
const fixedEditorOptions = {
|
|
6
|
+
padding: fixedEditorPadding,
|
|
7
|
+
scrollBeyondLastLine: false,
|
|
8
|
+
scrollbar: {
|
|
9
|
+
verticalScrollbarSize: 14,
|
|
10
|
+
horizontal: 'auto',
|
|
11
|
+
vertical: 'auto',
|
|
12
|
+
useShadows: true,
|
|
13
|
+
verticalHasArrows: false,
|
|
14
|
+
horizontalHasArrows: false,
|
|
15
|
+
alwaysConsumeMouseWheel: false,
|
|
16
|
+
},
|
|
17
|
+
renderLineHighlightOnlyWhenFocus: true,
|
|
18
|
+
overviewRulerLanes: 0,
|
|
19
|
+
overviewRulerBorder: false,
|
|
20
|
+
selectOnLineNumbers: false,
|
|
21
|
+
wordWrap: 'off',
|
|
22
|
+
lineNumbers: 'off',
|
|
23
|
+
lineDecorationsWidth: 0,
|
|
24
|
+
glyphMargin: false,
|
|
25
|
+
fixedOverflowWidgets: true,
|
|
26
|
+
minimap: { enabled: false },
|
|
27
|
+
renderValidationDecorations: 'on',
|
|
28
|
+
renderLineHighlight: 'none',
|
|
29
|
+
readOnly: true
|
|
30
|
+
};
|
|
31
|
+
const fixedDiffEditorOptions = {
|
|
32
|
+
...fixedEditorOptions,
|
|
33
|
+
glyphMargin: true,
|
|
34
|
+
enableSplitViewResizing: false,
|
|
35
|
+
renderIndicators: true,
|
|
36
|
+
renderMarginRevertIcon: false,
|
|
37
|
+
readOnly: false,
|
|
38
|
+
isInEmbeddedEditor: true,
|
|
39
|
+
renderOverviewRuler: false,
|
|
40
|
+
wordWrap: 'off',
|
|
41
|
+
diffWordWrap: 'off',
|
|
42
|
+
diffAlgorithm: 'advanced',
|
|
43
|
+
renderSideBySide: true,
|
|
44
|
+
useInlineViewWhenSpaceIsLimited: false
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { fixedDiffEditorOptions, fixedEditorOptions, fixedEditorPadding };
|