@codingame/monaco-vscode-notebook-service-override 5.2.0 → 6.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 +26 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +549 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +133 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +58 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +65 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +29 -27
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookCellPausing.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +6 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +27 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +32 -24
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +42 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +77 -57
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +184 -99
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +2 -1
- 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 +56 -112
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +31 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +10 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +3 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +10 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +7 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +21 -15
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +8 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +6 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +88 -86
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +94 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +73 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +3 -2
- 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 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +6 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +44 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +34 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.js +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +67 -53
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +11 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +3 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +5 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +15 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +4 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibility.js +0 -156
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notebook-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.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@6.0.0"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -2,6 +2,7 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
|
2
2
|
import './emptyTextEditorHint.css.js';
|
|
3
3
|
import { $ as $$1, addDisposableListener, EventType } from 'vscode/vscode/vs/base/browser/dom';
|
|
4
4
|
import { dispose, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { ContentWidgetPositionPreference } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
5
6
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
6
7
|
import { ChangeLanguageAction } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorStatus';
|
|
7
8
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
@@ -9,24 +10,27 @@ import { PLAINTEXT_LANGUAGE_ID } from 'vscode/vscode/vs/editor/common/languages/
|
|
|
9
10
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
10
11
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
11
12
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
12
|
-
import {
|
|
13
|
+
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
14
|
+
import { registerEditorContribution, EditorContributionInstantiation } from 'vscode/vscode/vs/editor/browser/editorExtensions';
|
|
13
15
|
import { IKeybindingService } from 'vscode/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
14
16
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
15
17
|
import { renderFormattedText } from 'vscode/vscode/vs/base/browser/formattedTextRenderer';
|
|
16
18
|
import { ApplyFileSnippetAction } from 'vscode/vscode/vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets';
|
|
17
19
|
import { IInlineChatSessionService } from 'vscode/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
18
|
-
import { IInlineChatService } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat.service';
|
|
19
20
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
20
21
|
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
21
22
|
import { KeybindingLabel } from 'vscode/vscode/vs/base/browser/ui/keybindingLabel/keybindingLabel';
|
|
22
23
|
import { OS } from 'vscode/vscode/vs/base/common/platform';
|
|
23
24
|
import { status } from 'vscode/vscode/vs/base/browser/ui/aria/aria';
|
|
25
|
+
import { AccessibilityVerbositySettingId } from 'vscode/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
24
26
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
25
27
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/configuration';
|
|
26
28
|
import { OUTPUT_MODE_ID, LOG_MODE_ID } from 'vscode/vscode/vs/workbench/services/output/common/output';
|
|
27
29
|
import { SEARCH_RESULT_LANGUAGE_ID } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
28
30
|
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
29
31
|
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
32
|
+
import { ChatAgentLocation } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents';
|
|
33
|
+
import { IChatAgentService } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
30
34
|
|
|
31
35
|
const _moduleId = "vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint";
|
|
32
36
|
const $ = $$1;
|
|
@@ -41,14 +45,14 @@ const $ = $$1;
|
|
|
41
45
|
{
|
|
42
46
|
key: 'accessibility.verbosity.untitledHint',
|
|
43
47
|
migrateFn: (value, _accessor) => ([
|
|
44
|
-
[
|
|
48
|
+
[AccessibilityVerbositySettingId.EmptyEditorHint, { value }],
|
|
45
49
|
['accessibility.verbosity.untitledHint', { value: undefined }]
|
|
46
50
|
])
|
|
47
51
|
}]);
|
|
48
52
|
const emptyTextEditorHintSetting = 'workbench.editor.empty.hint';
|
|
49
53
|
let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
50
54
|
static { this.ID = 'editor.contrib.emptyTextEditorHint'; }
|
|
51
|
-
constructor(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService,
|
|
55
|
+
constructor(editor, editorGroupsService, commandService, configurationService, hoverService, keybindingService, inlineChatSessionService, chatAgentService, telemetryService, productService) {
|
|
52
56
|
this.editor = editor;
|
|
53
57
|
this.editorGroupsService = editorGroupsService;
|
|
54
58
|
this.commandService = commandService;
|
|
@@ -56,17 +60,17 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
56
60
|
this.hoverService = hoverService;
|
|
57
61
|
this.keybindingService = keybindingService;
|
|
58
62
|
this.inlineChatSessionService = inlineChatSessionService;
|
|
59
|
-
this.
|
|
63
|
+
this.chatAgentService = chatAgentService;
|
|
60
64
|
this.telemetryService = telemetryService;
|
|
61
65
|
this.productService = productService;
|
|
62
66
|
this.toDispose = [];
|
|
63
67
|
this.toDispose.push(this.editor.onDidChangeModel(() => this.update()));
|
|
64
68
|
this.toDispose.push(this.editor.onDidChangeModelLanguage(() => this.update()));
|
|
65
69
|
this.toDispose.push(this.editor.onDidChangeModelContent(() => this.update()));
|
|
66
|
-
this.toDispose.push(this.
|
|
70
|
+
this.toDispose.push(this.chatAgentService.onDidChangeAgents(() => this.update()));
|
|
67
71
|
this.toDispose.push(this.editor.onDidChangeModelDecorations(() => this.update()));
|
|
68
72
|
this.toDispose.push(this.editor.onDidChangeConfiguration((e) => {
|
|
69
|
-
if (e.hasChanged(
|
|
73
|
+
if (e.hasChanged(EditorOption.readOnly)) {
|
|
70
74
|
this.update();
|
|
71
75
|
}
|
|
72
76
|
}));
|
|
@@ -94,7 +98,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
94
98
|
if (configValue === 'hidden') {
|
|
95
99
|
return false;
|
|
96
100
|
}
|
|
97
|
-
if (this.editor.getOption(
|
|
101
|
+
if (this.editor.getOption(EditorOption.readOnly)) {
|
|
98
102
|
return false;
|
|
99
103
|
}
|
|
100
104
|
const model = this.editor.getModel();
|
|
@@ -115,9 +119,9 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
115
119
|
if (hasConflictingDecorations) {
|
|
116
120
|
return false;
|
|
117
121
|
}
|
|
118
|
-
const
|
|
119
|
-
const shouldRenderDefaultHint = model?.uri.scheme === Schemas.untitled && languageId === PLAINTEXT_LANGUAGE_ID &&
|
|
120
|
-
return
|
|
122
|
+
const hasEditorAgents = Boolean(this.chatAgentService.getDefaultAgent(ChatAgentLocation.Editor));
|
|
123
|
+
const shouldRenderDefaultHint = model?.uri.scheme === Schemas.untitled && languageId === PLAINTEXT_LANGUAGE_ID && hasEditorAgents;
|
|
124
|
+
return hasEditorAgents || shouldRenderDefaultHint;
|
|
121
125
|
}
|
|
122
126
|
update() {
|
|
123
127
|
const shouldRenderHint = this._shouldRenderHint();
|
|
@@ -130,7 +134,7 @@ let EmptyTextEditorHintContribution = class EmptyTextEditorHintContribution {
|
|
|
130
134
|
this.configurationService,
|
|
131
135
|
this.hoverService,
|
|
132
136
|
this.keybindingService,
|
|
133
|
-
this.
|
|
137
|
+
this.chatAgentService,
|
|
134
138
|
this.telemetryService,
|
|
135
139
|
this.productService
|
|
136
140
|
)));
|
|
@@ -152,13 +156,13 @@ EmptyTextEditorHintContribution = ( (__decorate([
|
|
|
152
156
|
( (__param(4, IHoverService))),
|
|
153
157
|
( (__param(5, IKeybindingService))),
|
|
154
158
|
( (__param(6, IInlineChatSessionService))),
|
|
155
|
-
( (__param(7,
|
|
159
|
+
( (__param(7, IChatAgentService))),
|
|
156
160
|
( (__param(8, ITelemetryService))),
|
|
157
161
|
( (__param(9, IProductService)))
|
|
158
162
|
], EmptyTextEditorHintContribution)));
|
|
159
163
|
class EmptyTextEditorHintContentWidget {
|
|
160
164
|
static { this.ID = 'editor.widget.emptyHint'; }
|
|
161
|
-
constructor(editor, options, editorGroupsService, commandService, configurationService, hoverService, keybindingService,
|
|
165
|
+
constructor(editor, options, editorGroupsService, commandService, configurationService, hoverService, keybindingService, chatAgentService, telemetryService, productService) {
|
|
162
166
|
this.editor = editor;
|
|
163
167
|
this.options = options;
|
|
164
168
|
this.editorGroupsService = editorGroupsService;
|
|
@@ -166,20 +170,20 @@ class EmptyTextEditorHintContentWidget {
|
|
|
166
170
|
this.configurationService = configurationService;
|
|
167
171
|
this.hoverService = hoverService;
|
|
168
172
|
this.keybindingService = keybindingService;
|
|
169
|
-
this.
|
|
173
|
+
this.chatAgentService = chatAgentService;
|
|
170
174
|
this.telemetryService = telemetryService;
|
|
171
175
|
this.productService = productService;
|
|
172
176
|
this.isVisible = false;
|
|
173
177
|
this.ariaLabel = '';
|
|
174
178
|
this.toDispose = ( (new DisposableStore()));
|
|
175
179
|
this.toDispose.add(this.editor.onDidChangeConfiguration((e) => {
|
|
176
|
-
if (this.domNode && e.hasChanged(
|
|
180
|
+
if (this.domNode && e.hasChanged(EditorOption.fontInfo)) {
|
|
177
181
|
this.editor.applyFontInfo(this.domNode);
|
|
178
182
|
}
|
|
179
183
|
}));
|
|
180
184
|
const onDidFocusEditorText = Event.debounce(this.editor.onDidFocusEditorText, () => undefined, 500);
|
|
181
185
|
this.toDispose.add(onDidFocusEditorText(() => {
|
|
182
|
-
if (this.editor.hasTextFocus() && this.isVisible && this.ariaLabel && this.configurationService.getValue(
|
|
186
|
+
if (this.editor.hasTextFocus() && this.isVisible && this.ariaLabel && this.configurationService.getValue(AccessibilityVerbositySettingId.EmptyEditorHint)) {
|
|
183
187
|
status(this.ariaLabel);
|
|
184
188
|
}
|
|
185
189
|
}));
|
|
@@ -189,7 +193,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
189
193
|
return EmptyTextEditorHintContentWidget.ID;
|
|
190
194
|
}
|
|
191
195
|
_getHintInlineChat(providers) {
|
|
192
|
-
const providerName = (providers.length === 1 ? providers[0].
|
|
196
|
+
const providerName = (providers.length === 1 ? providers[0].fullName : undefined) ?? this.productService.nameShort;
|
|
193
197
|
const inlineChatId = 'inlineChat.start';
|
|
194
198
|
let ariaLabel = `Ask ${providerName} something or start typing to dismiss.`;
|
|
195
199
|
const handleClick = () => {
|
|
@@ -349,14 +353,14 @@ class EmptyTextEditorHintContentWidget {
|
|
|
349
353
|
this.domNode = $('.empty-editor-hint');
|
|
350
354
|
this.domNode.style.width = 'max-content';
|
|
351
355
|
this.domNode.style.paddingLeft = '4px';
|
|
352
|
-
const inlineChatProviders =
|
|
356
|
+
const inlineChatProviders = this.chatAgentService.getActivatedAgents().filter(candidate => candidate.locations.includes(ChatAgentLocation.Editor));
|
|
353
357
|
const { hintElement, ariaLabel } = !inlineChatProviders.length ? this._getHintDefault() : this._getHintInlineChat(inlineChatProviders);
|
|
354
358
|
this.domNode.append(hintElement);
|
|
355
359
|
this.ariaLabel = ariaLabel.concat(( localizeWithPath(
|
|
356
360
|
_moduleId,
|
|
357
361
|
5,
|
|
358
362
|
' Toggle {0} in settings to disable this hint.',
|
|
359
|
-
|
|
363
|
+
AccessibilityVerbositySettingId.EmptyEditorHint
|
|
360
364
|
)));
|
|
361
365
|
this.toDispose.add(addDisposableListener(this.domNode, 'click', () => {
|
|
362
366
|
this.editor.focus();
|
|
@@ -368,7 +372,7 @@ class EmptyTextEditorHintContentWidget {
|
|
|
368
372
|
getPosition() {
|
|
369
373
|
return {
|
|
370
374
|
position: { lineNumber: 1, column: 1 },
|
|
371
|
-
preference: [
|
|
375
|
+
preference: [ContentWidgetPositionPreference.EXACT]
|
|
372
376
|
};
|
|
373
377
|
}
|
|
374
378
|
dispose() {
|
|
@@ -376,6 +380,6 @@ class EmptyTextEditorHintContentWidget {
|
|
|
376
380
|
dispose(this.toDispose);
|
|
377
381
|
}
|
|
378
382
|
}
|
|
379
|
-
registerEditorContribution(EmptyTextEditorHintContribution.ID, EmptyTextEditorHintContribution,
|
|
383
|
+
registerEditorContribution(EmptyTextEditorHintContribution.ID, EmptyTextEditorHintContribution, EditorContributionInstantiation.Eager);
|
|
380
384
|
|
|
381
385
|
export { EmptyTextEditorHintContribution, emptyTextEditorHintSetting };
|