@codingame/monaco-vscode-notebook-service-override 6.0.2 → 7.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 +52 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +25 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +4 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +245 -88
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/apiActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +20 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +3 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +13 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +13 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +10 -5
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +0 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +6 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notebook-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
32
|
+
"vscode": "npm:@codingame/monaco-vscode-api@7.0.0"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import './emptyTextEditorHint.css.js';
|
|
3
|
-
import { $ as $$1, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
|
+
import { $ as $$1, getActiveWindow, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
4
|
import { dispose, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { ContentWidgetPositionPreference } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
6
6
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
@@ -23,36 +23,21 @@ import { KeybindingLabel } from 'vscode/vscode/vs/base/browser/ui/keybindingLabe
|
|
|
23
23
|
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
24
24
|
import { status } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
25
25
|
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
26
|
-
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
27
|
-
import { Extensions } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
28
26
|
import { OUTPUT_MODE_ID, LOG_MODE_ID } from 'vscode/vscode/vs/workbench/services/output/common/output';
|
|
29
27
|
import { SEARCH_RESULT_LANGUAGE_ID } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
30
28
|
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
31
29
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
32
30
|
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
33
31
|
import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
32
|
+
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
33
|
+
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
34
34
|
|
|
35
35
|
const _moduleId = "vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint";
|
|
36
36
|
const $ = $$1;
|
|
37
|
-
( (Registry.as(Extensions.ConfigurationMigration)))
|
|
38
|
-
.registerConfigurationMigrations([{
|
|
39
|
-
key: 'workbench.editor.untitled.hint',
|
|
40
|
-
migrateFn: (value, _accessor) => ([
|
|
41
|
-
[emptyTextEditorHintSetting, { value }],
|
|
42
|
-
['workbench.editor.untitled.hint', { value: undefined }]
|
|
43
|
-
])
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
key: 'accessibility.verbosity.untitledHint',
|
|
47
|
-
migrateFn: (value, _accessor) => ([
|
|
48
|
-
[AccessibilityVerbositySettingId.EmptyEditorHint, { value }],
|
|
49
|
-
['accessibility.verbosity.untitledHint', { value: undefined }]
|
|
50
|
-
])
|
|
51
|
-
}]);
|
|
52
37
|
const emptyTextEditorHintSetting = 'workbench.editor.empty.hint';
|
|
53
38
|
let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
54
39
|
static { this.ID = 'editor.contrib.emptyTextEditorHint'; }
|
|
55
|
-
constructor(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService) {
|
|
40
|
+
constructor(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService, contextMenuService) {
|
|
56
41
|
this.editor = editor;
|
|
57
42
|
this.editorGroupsService = editorGroupsService;
|
|
58
43
|
this.commandService = commandService;
|
|
@@ -63,6 +48,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
63
48
|
this.chatAgentService = chatAgentService;
|
|
64
49
|
this.telemetryService = telemetryService;
|
|
65
50
|
this.productService = productService;
|
|
51
|
+
this.contextMenuService = contextMenuService;
|
|
66
52
|
this.toDispose = [];
|
|
67
53
|
this.toDispose.push(this.editor.onDidChangeModel(() => this.update()));
|
|
68
54
|
this.toDispose.push(this.editor.onDidChangeModelLanguage(() => this.update()));
|
|
@@ -120,7 +106,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
120
106
|
return false;
|
|
121
107
|
}
|
|
122
108
|
const hasEditorAgents = Boolean(this.chatAgentService.getDefaultAgent(ChatAgentLocation.Editor));
|
|
123
|
-
const shouldRenderDefaultHint = model?.uri.scheme === Schemas.untitled && languageId === PLAINTEXT_LANGUAGE_ID
|
|
109
|
+
const shouldRenderDefaultHint = model?.uri.scheme === Schemas.untitled && languageId === PLAINTEXT_LANGUAGE_ID;
|
|
124
110
|
return hasEditorAgents || shouldRenderDefaultHint;
|
|
125
111
|
}
|
|
126
112
|
update() {
|
|
@@ -136,7 +122,8 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
136
122
|
this.keybindingService,
|
|
137
123
|
this.chatAgentService,
|
|
138
124
|
this.telemetryService,
|
|
139
|
-
this.productService
|
|
125
|
+
this.productService,
|
|
126
|
+
this.contextMenuService
|
|
140
127
|
)));
|
|
141
128
|
}
|
|
142
129
|
else if (!shouldRenderHint && this.textHintContentWidget) {
|
|
@@ -158,11 +145,12 @@ EmptyTextEditorHintContribution = ( (__decorate([
|
|
|
158
145
|
( (__param(6, IInlineChatSessionService))),
|
|
159
146
|
( (__param(7, IChatAgentService))),
|
|
160
147
|
( (__param(8, ITelemetryService))),
|
|
161
|
-
( (__param(9, IProductService)))
|
|
148
|
+
( (__param(9, IProductService))),
|
|
149
|
+
( (__param(10, IContextMenuService)))
|
|
162
150
|
], EmptyTextEditorHintContribution)));
|
|
163
151
|
class EmptyTextEditorHintContentWidget {
|
|
164
152
|
static { this.ID = 'editor.widget.emptyHint'; }
|
|
165
|
-
constructor(editor, options, editorGroupsService, commandService, configurationService, hoverService, keybindingService, chatAgentService, telemetryService, productService) {
|
|
153
|
+
constructor(editor, options, editorGroupsService, commandService, configurationService, hoverService, keybindingService, chatAgentService, telemetryService, productService, contextMenuService) {
|
|
166
154
|
this.editor = editor;
|
|
167
155
|
this.options = options;
|
|
168
156
|
this.editorGroupsService = editorGroupsService;
|
|
@@ -173,6 +161,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
173
161
|
this.chatAgentService = chatAgentService;
|
|
174
162
|
this.telemetryService = telemetryService;
|
|
175
163
|
this.productService = productService;
|
|
164
|
+
this.contextMenuService = contextMenuService;
|
|
176
165
|
this.isVisible = false;
|
|
177
166
|
this.ariaLabel = '';
|
|
178
167
|
this.toDispose = ( (new DisposableStore()));
|
|
@@ -192,6 +181,35 @@ class EmptyTextEditorHintContentWidget {
|
|
|
192
181
|
getId() {
|
|
193
182
|
return EmptyTextEditorHintContentWidget.ID;
|
|
194
183
|
}
|
|
184
|
+
_disableHint(e) {
|
|
185
|
+
const disableHint = () => {
|
|
186
|
+
this.configurationService.updateValue(emptyTextEditorHintSetting, 'hidden');
|
|
187
|
+
this.dispose();
|
|
188
|
+
this.editor.focus();
|
|
189
|
+
};
|
|
190
|
+
if (!e) {
|
|
191
|
+
disableHint();
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
this.contextMenuService.showContextMenu({
|
|
195
|
+
getAnchor: () => { return (
|
|
196
|
+
(new StandardMouseEvent(getActiveWindow(), e))
|
|
197
|
+
); },
|
|
198
|
+
getActions: () => {
|
|
199
|
+
return [{
|
|
200
|
+
id: 'workench.action.disableEmptyEditorHint',
|
|
201
|
+
label: ( localizeWithPath(_moduleId, 0, "Disable Empty Editor Hint")),
|
|
202
|
+
tooltip: ( localizeWithPath(_moduleId, 0, "Disable Empty Editor Hint")),
|
|
203
|
+
enabled: true,
|
|
204
|
+
class: undefined,
|
|
205
|
+
run: () => {
|
|
206
|
+
disableHint();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
195
213
|
_getHintInlineChat(providers) {
|
|
196
214
|
const providerName = (providers.length === 1 ? providers[0].fullName : undefined) ?? this.productService.nameShort;
|
|
197
215
|
const inlineChatId = 'inlineChat.start';
|
|
@@ -220,7 +238,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
220
238
|
if (keybindingHint && keybindingHintLabel) {
|
|
221
239
|
const actionPart = ( localizeWithPath(
|
|
222
240
|
_moduleId,
|
|
223
|
-
|
|
241
|
+
1,
|
|
224
242
|
'Press {0} to ask {1} to do something. ',
|
|
225
243
|
keybindingHintLabel,
|
|
226
244
|
providerName
|
|
@@ -230,6 +248,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
230
248
|
const hintPart = $('a', undefined, fragment);
|
|
231
249
|
hintPart.style.fontStyle = 'italic';
|
|
232
250
|
hintPart.style.cursor = 'pointer';
|
|
251
|
+
this.toDispose.add(addDisposableListener(hintPart, EventType.CONTEXT_MENU, (e) => this._disableHint(e)));
|
|
233
252
|
this.toDispose.add(addDisposableListener(hintPart, EventType.CLICK, handleClick));
|
|
234
253
|
return hintPart;
|
|
235
254
|
}
|
|
@@ -246,10 +265,11 @@ class EmptyTextEditorHintContentWidget {
|
|
|
246
265
|
label.element.style.display = 'inline';
|
|
247
266
|
if (this.options.clickable) {
|
|
248
267
|
label.element.style.cursor = 'pointer';
|
|
268
|
+
this.toDispose.add(addDisposableListener(label.element, EventType.CONTEXT_MENU, (e) => this._disableHint(e)));
|
|
249
269
|
this.toDispose.add(addDisposableListener(label.element, EventType.CLICK, handleClick));
|
|
250
270
|
}
|
|
251
271
|
hintElement.appendChild(after);
|
|
252
|
-
const typeToDismiss = ( localizeWithPath(_moduleId,
|
|
272
|
+
const typeToDismiss = ( localizeWithPath(_moduleId, 2, 'Start typing to dismiss.'));
|
|
253
273
|
const textHint2 = $('span', undefined, typeToDismiss);
|
|
254
274
|
textHint2.style.fontStyle = 'italic';
|
|
255
275
|
hintElement.appendChild(textHint2);
|
|
@@ -258,14 +278,14 @@ class EmptyTextEditorHintContentWidget {
|
|
|
258
278
|
else {
|
|
259
279
|
const hintMsg = ( localizeWithPath(
|
|
260
280
|
_moduleId,
|
|
261
|
-
|
|
281
|
+
3,
|
|
262
282
|
'[[Ask {0} to do something]] or start typing to dismiss.',
|
|
263
283
|
providerName
|
|
264
284
|
));
|
|
265
285
|
const rendered = renderFormattedText(hintMsg, { actionHandler: hintHandler });
|
|
266
286
|
hintElement.appendChild(rendered);
|
|
267
287
|
}
|
|
268
|
-
return { ariaLabel,
|
|
288
|
+
return { ariaLabel, hintElement };
|
|
269
289
|
}
|
|
270
290
|
_getHintDefault() {
|
|
271
291
|
const hintHandler = {
|
|
@@ -282,7 +302,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
282
302
|
chooseEditorOnClickOrTap(event.browserEvent);
|
|
283
303
|
break;
|
|
284
304
|
case '3':
|
|
285
|
-
|
|
305
|
+
this._disableHint();
|
|
286
306
|
break;
|
|
287
307
|
}
|
|
288
308
|
}
|
|
@@ -317,14 +337,9 @@ class EmptyTextEditorHintContentWidget {
|
|
|
317
337
|
this.editorGroupsService.activeGroup.closeEditor(activeEditorInput, { preserveFocus: true });
|
|
318
338
|
}
|
|
319
339
|
};
|
|
320
|
-
const dontShowOnClickOrTap = () => {
|
|
321
|
-
this.configurationService.updateValue(emptyTextEditorHintSetting, 'hidden');
|
|
322
|
-
this.dispose();
|
|
323
|
-
this.editor.focus();
|
|
324
|
-
};
|
|
325
340
|
const hintMsg = ( localizeWithPath(
|
|
326
341
|
_moduleId,
|
|
327
|
-
|
|
342
|
+
4,
|
|
328
343
|
'[[Select a language]], or [[fill with template]], or [[open a different editor]] to get started.\nStart typing to dismiss or [[don\'t show]] this again.'
|
|
329
344
|
));
|
|
330
345
|
const hintElement = renderFormattedText(hintMsg, {
|
|
@@ -336,7 +351,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
336
351
|
const keybindingLabels = ( (keybindingsLookup.map((id) => this.keybindingService.lookupKeybinding(id)?.getLabel() ?? id)));
|
|
337
352
|
const ariaLabel = ( localizeWithPath(
|
|
338
353
|
_moduleId,
|
|
339
|
-
|
|
354
|
+
5,
|
|
340
355
|
'Execute {0} to select a language, execute {1} to fill with template, or execute {2} to open a different editor and get started. Start typing to dismiss.',
|
|
341
356
|
...keybindingLabels
|
|
342
357
|
));
|
|
@@ -344,7 +359,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
344
359
|
anchor.style.cursor = 'pointer';
|
|
345
360
|
const id = keybindingsLookup.shift();
|
|
346
361
|
const title = id && this.keybindingService.lookupKeybinding(id)?.getLabel();
|
|
347
|
-
hintHandler.disposables.add(this.hoverService.
|
|
362
|
+
hintHandler.disposables.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), anchor, title ?? ''));
|
|
348
363
|
}
|
|
349
364
|
return { hintElement, ariaLabel };
|
|
350
365
|
}
|
|
@@ -358,7 +373,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
358
373
|
this.domNode.append(hintElement);
|
|
359
374
|
this.ariaLabel = ariaLabel.concat(( localizeWithPath(
|
|
360
375
|
_moduleId,
|
|
361
|
-
|
|
376
|
+
6,
|
|
362
377
|
' Toggle {0} in settings to disable this hint.',
|
|
363
378
|
AccessibilityVerbositySettingId.EmptyEditorHint
|
|
364
379
|
)));
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
|
3
3
|
import { registerEditorContribution, EditorContributionInstantiation } 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
|
+
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
6
7
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
7
8
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
8
9
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
@@ -16,8 +17,8 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
16
17
|
|
|
17
18
|
let EmptyCellEditorHintContribution = class EmptyCellEditorHintContribution extends EmptyTextEditorHintContribution {
|
|
18
19
|
static { this.CONTRIB_ID = 'notebook.editor.contrib.emptyCellEditorHint'; }
|
|
19
|
-
constructor(editor, _editorService, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService) {
|
|
20
|
-
super(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService);
|
|
20
|
+
constructor(editor, _editorService, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService, contextMenuService) {
|
|
21
|
+
super(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService, contextMenuService);
|
|
21
22
|
this._editorService = _editorService;
|
|
22
23
|
const activeEditor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane);
|
|
23
24
|
if (!activeEditor) {
|
|
@@ -62,7 +63,8 @@ EmptyCellEditorHintContribution = ( __decorate([
|
|
|
62
63
|
( __param(7, IInlineChatSessionService)),
|
|
63
64
|
( __param(8, IChatAgentService)),
|
|
64
65
|
( __param(9, ITelemetryService)),
|
|
65
|
-
( __param(10, IProductService))
|
|
66
|
+
( __param(10, IProductService)),
|
|
67
|
+
( __param(11, IContextMenuService))
|
|
66
68
|
], EmptyCellEditorHintContribution));
|
|
67
69
|
registerEditorContribution(EmptyCellEditorHintContribution.CONTRIB_ID, EmptyCellEditorHintContribution, EditorContributionInstantiation.Eager);
|
|
68
70
|
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js
CHANGED
|
@@ -6,8 +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 {
|
|
10
|
-
import { Extensions, registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
9
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
11
10
|
import { CENTER_ACTIVE_CELL } from '../navigation/arrow.js';
|
|
12
11
|
import { SELECT_KERNEL_ID } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
13
12
|
import { SELECT_NOTEBOOK_INDENTATION_ID } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/editActions';
|
|
@@ -15,9 +14,10 @@ import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/cont
|
|
|
15
14
|
import { NotebookCellsChangeType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
15
|
import { INotebookKernelService } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
17
16
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
18
|
-
import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
19
17
|
import { StatusbarAlignment } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
|
|
20
18
|
import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar.service';
|
|
19
|
+
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
20
|
+
import { ServiceCollection } from 'vscode/vscode/vs/platform/instantiation/common/serviceCollection';
|
|
21
21
|
|
|
22
22
|
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar";
|
|
23
23
|
let ImplictKernelSelector = class ImplictKernelSelector {
|
|
@@ -136,7 +136,6 @@ KernelStatus = ( (__decorate([
|
|
|
136
136
|
( (__param(2, INotebookKernelService))),
|
|
137
137
|
( (__param(3, IInstantiationService)))
|
|
138
138
|
], KernelStatus)));
|
|
139
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(KernelStatus, LifecyclePhase.Restored);
|
|
140
139
|
let ActiveCellStatus = class ActiveCellStatus extends Disposable {
|
|
141
140
|
constructor(_editorService, _statusbarService) {
|
|
142
141
|
super();
|
|
@@ -201,7 +200,6 @@ ActiveCellStatus = ( (__decorate([
|
|
|
201
200
|
( (__param(0, IEditorService))),
|
|
202
201
|
( (__param(1, IStatusbarService)))
|
|
203
202
|
], ActiveCellStatus)));
|
|
204
|
-
( (Registry.as(Extensions.Workbench))).registerWorkbenchContribution(ActiveCellStatus, LifecyclePhase.Restored);
|
|
205
203
|
let NotebookIndentationStatus = class NotebookIndentationStatus extends Disposable {
|
|
206
204
|
static { this.ID = 'selectNotebookIndentation'; }
|
|
207
205
|
constructor(_editorService, _statusbarService, _configurationService) {
|
|
@@ -273,6 +271,26 @@ NotebookIndentationStatus = ( (__decorate([
|
|
|
273
271
|
( (__param(1, IStatusbarService))),
|
|
274
272
|
( (__param(2, IConfigurationService)))
|
|
275
273
|
], NotebookIndentationStatus)));
|
|
276
|
-
|
|
274
|
+
let NotebookEditorStatusContribution = class NotebookEditorStatusContribution extends Disposable {
|
|
275
|
+
static { this.ID = 'notebook.contrib.editorStatus'; }
|
|
276
|
+
constructor(instantiationService, editorGroupService, editorService) {
|
|
277
|
+
super();
|
|
278
|
+
const mainInstantiationService = instantiationService.createChild(( (new ServiceCollection([IEditorService, editorService.createScoped('main', this._store)]))));
|
|
279
|
+
this._register(mainInstantiationService.createInstance(KernelStatus));
|
|
280
|
+
this._register(mainInstantiationService.createInstance(ActiveCellStatus));
|
|
281
|
+
this._register(mainInstantiationService.createInstance(NotebookIndentationStatus));
|
|
282
|
+
this._register(editorGroupService.onDidCreateAuxiliaryEditorPart(({ part, instantiationService, disposables }) => {
|
|
283
|
+
disposables.add(instantiationService.createInstance(KernelStatus));
|
|
284
|
+
disposables.add(instantiationService.createInstance(ActiveCellStatus));
|
|
285
|
+
disposables.add(instantiationService.createInstance(NotebookIndentationStatus));
|
|
286
|
+
}));
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
NotebookEditorStatusContribution = ( (__decorate([
|
|
290
|
+
( (__param(0, IInstantiationService))),
|
|
291
|
+
( (__param(1, IEditorGroupsService))),
|
|
292
|
+
( (__param(2, IEditorService)))
|
|
293
|
+
], NotebookEditorStatusContribution)));
|
|
294
|
+
registerWorkbenchContribution2(NotebookEditorStatusContribution.ID, NotebookEditorStatusContribution, WorkbenchPhase.AfterRestored);
|
|
277
295
|
|
|
278
|
-
export { ActiveCellStatus, KernelStatus, NotebookIndentationStatus };
|
|
296
|
+
export { ActiveCellStatus, KernelStatus, NotebookEditorStatusContribution, NotebookIndentationStatus };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import n from 'vscode/external/rollup-plugin-styles/dist/runtime/inject-css.js';
|
|
2
2
|
|
|
3
|
-
var css = ".monaco-workbench .notebookOverlay.notebook-editor.find-hide-transition,.monaco-workbench .notebookOverlay.notebook-editor.find-show-transition{overflow-y:hidden}.monaco-workbench .notebookOverlay.notebook-editor .simple-fr-find-part-wrapper .matchesCount{box-sizing:border-box;overflow:hidden;padding:0 2px;text-align:center;text-overflow:ellipsis;white-space:nowrap}";
|
|
3
|
+
var css = ".monaco-workbench .notebookOverlay.notebook-editor.find-hide-transition,.monaco-workbench .notebookOverlay.notebook-editor.find-show-transition{overflow-y:hidden}.monaco-workbench .notebookOverlay.notebook-editor .simple-fr-find-part-wrapper .matchesCount{box-sizing:border-box;overflow:hidden;padding:0 2px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.monaco-workbench .nb-findScope{background-color:var(--vscode-editor-findRangeHighlightBackground)}";
|
|
4
4
|
n(css,{});
|
|
5
5
|
|
|
6
6
|
export { css, css as default };
|
|
@@ -3,6 +3,7 @@ import { KeyCode, KeyMod } from 'vscode/vscode/vs/base/common/keyCodes';
|
|
|
3
3
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
4
4
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
5
5
|
import { ICodeEditorService } from 'vscode/vscode/vs/editor/browser/services/codeEditorService';
|
|
6
|
+
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
6
7
|
import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
|
|
7
8
|
import { getSelectionSearchString, StartFindAction, FindStartFocusAction, StartFindReplaceAction } from 'vscode/vscode/vs/editor/contrib/find/browser/findController';
|
|
8
9
|
import { localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
@@ -10,13 +11,12 @@ import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/comm
|
|
|
10
11
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
11
12
|
import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
12
13
|
import { NotebookFindContrib } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget';
|
|
14
|
+
import { NotebookMultiCellAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
13
15
|
import { getNotebookEditorFromEditorPane } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
14
16
|
import { registerNotebookContribution } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
15
|
-
import { CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
17
|
+
import { NotebookFindScopeType, CellUri } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
18
|
import { NOTEBOOK_EDITOR_FOCUSED, KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR, INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
17
19
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
18
|
-
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
19
|
-
import { NotebookMultiCellAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
20
20
|
|
|
21
21
|
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/find/notebookFind";
|
|
22
22
|
registerNotebookContribution(NotebookFindContrib.id, NotebookFindContrib);
|
|
@@ -66,12 +66,7 @@ registerAction2(class extends NotebookMultiCellAction {
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
const controller = editor.getContribution(NotebookFindContrib.id);
|
|
69
|
-
|
|
70
|
-
controller.show(undefined, { searchInRanges: true, selectedRanges: editor.getSelections() });
|
|
71
|
-
}
|
|
72
|
-
else {
|
|
73
|
-
controller.show(undefined, { searchInRanges: false, selectedRanges: [] });
|
|
74
|
-
}
|
|
69
|
+
controller.show(undefined, { findScope: { findScopeType: NotebookFindScopeType.None } });
|
|
75
70
|
}
|
|
76
71
|
});
|
|
77
72
|
function notebookContainsTextModel(uri, textModel) {
|
|
@@ -15,7 +15,7 @@ import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from 'vscode/vscode/vs/workben
|
|
|
15
15
|
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
16
16
|
import { CellEditState } from 'vscode/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
17
17
|
import { NOTEBOOK_EDITOR_CURSOR_BOUNDARY, CellKind } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
18
|
-
import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
18
|
+
import { NOTEBOOK_OUTPUT_INPUT_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_CELL_TYPE, NOTEBOOK_CELL_MARKDOWN_EDIT_MODE, NOTEBOOK_CURSOR_NAVIGATION_MODE, NOTEBOOK_OUTPUT_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_CELL_HAS_OUTPUTS } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
19
19
|
|
|
20
20
|
const _moduleId = "vs/workbench/contrib/notebook/browser/contrib/navigation/arrow";
|
|
21
21
|
const NOTEBOOK_FOCUS_TOP = 'notebook.focusTop';
|
|
@@ -98,10 +98,10 @@ registerAction2(class FocusNextCellAction extends NotebookCellAction {
|
|
|
98
98
|
weight: KeybindingWeight.WorkbenchContrib
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
when:
|
|
102
|
-
primary: KeyMod.CtrlCmd |
|
|
103
|
-
mac: { primary: KeyMod.
|
|
104
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
101
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED))),
|
|
102
|
+
primary: KeyMod.CtrlCmd | KeyCode.PageDown,
|
|
103
|
+
mac: { primary: KeyMod.WinCtrl | KeyCode.PageUp, },
|
|
104
|
+
weight: KeybindingWeight.WorkbenchContrib + 1
|
|
105
105
|
},
|
|
106
106
|
]
|
|
107
107
|
});
|
|
@@ -167,10 +167,10 @@ registerAction2(class FocusPreviousCellAction extends NotebookCellAction {
|
|
|
167
167
|
weight: KeybindingWeight.WorkbenchContrib,
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
|
-
when:
|
|
171
|
-
primary: KeyMod.CtrlCmd |
|
|
172
|
-
mac: { primary: KeyMod.
|
|
173
|
-
weight: KeybindingWeight.WorkbenchContrib
|
|
170
|
+
when: ( (ContextKeyExpr.and(NOTEBOOK_CELL_EDITOR_FOCUSED, CONTEXT_ACCESSIBILITY_MODE_ENABLED))),
|
|
171
|
+
primary: KeyMod.CtrlCmd | KeyCode.PageUp,
|
|
172
|
+
mac: { primary: KeyMod.WinCtrl | KeyCode.PageUp, },
|
|
173
|
+
weight: KeybindingWeight.WorkbenchContrib + 1
|
|
174
174
|
},
|
|
175
175
|
],
|
|
176
176
|
});
|