@codingame/monaco-vscode-notebook-service-override 37.6.1 → 38.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.
Files changed (49) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +7 -7
  4. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +21 -21
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +4 -4
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +1 -1
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +3 -3
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +6 -6
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +9 -9
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +4 -4
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +4 -4
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +7 -6
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +13 -13
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -3
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +9 -9
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +12 -12
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +3 -3
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +25 -25
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +22 -22
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +21 -21
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +12 -12
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +21 -21
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditor.js +4 -5
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +59 -59
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +10 -10
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +31 -31
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +3 -3
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.d.ts +0 -1
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelServiceImpl.js +22 -28
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +3 -3
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +1 -1
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +1 -1
  45. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +3 -3
  46. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +14 -14
  47. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +1 -1
  48. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +14 -13
  49. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
@@ -28,7 +28,7 @@ const NotebookPreloadContribution = ( Object.freeze({
28
28
  localResourceRoots: "localResourceRoots"
29
29
  }));
30
30
  const notebookProviderContribution = {
31
- description: ( localize(17005, "Contributes notebook document provider.")),
31
+ description: ( localize(19502, "Contributes notebook document provider.")),
32
32
  type: "array",
33
33
  defaultSnippets: [{
34
34
  body: [{
@@ -49,25 +49,25 @@ const notebookProviderContribution = {
49
49
  properties: {
50
50
  [NotebookEditorContribution.type]: {
51
51
  type: "string",
52
- description: ( localize(17006, "Type of the notebook."))
52
+ description: ( localize(19503, "Type of the notebook."))
53
53
  },
54
54
  [NotebookEditorContribution.displayName]: {
55
55
  type: "string",
56
- description: ( localize(17007, "Human readable name of the notebook."))
56
+ description: ( localize(19504, "Human readable name of the notebook."))
57
57
  },
58
58
  [NotebookEditorContribution.selector]: {
59
59
  type: "array",
60
- description: ( localize(17008, "Set of globs that the notebook is for.")),
60
+ description: ( localize(19505, "Set of globs that the notebook is for.")),
61
61
  items: {
62
62
  type: "object",
63
63
  properties: {
64
64
  filenamePattern: {
65
65
  type: "string",
66
- description: ( localize(17009, "Glob that the notebook is enabled for."))
66
+ description: ( localize(19506, "Glob that the notebook is enabled for."))
67
67
  },
68
68
  excludeFileNamePattern: {
69
69
  type: "string",
70
- description: ( localize(17010, "Glob that the notebook is disabled for."))
70
+ description: ( localize(19507, "Glob that the notebook is disabled for."))
71
71
  }
72
72
  }
73
73
  }
@@ -75,15 +75,15 @@ const notebookProviderContribution = {
75
75
  [NotebookEditorContribution.priority]: {
76
76
  type: "string",
77
77
  markdownDeprecationMessage: ( localize(
78
- 17011,
78
+ 19508,
79
79
  "Controls if the custom editor is enabled automatically when the user opens a file. This may be overridden by users using the `workbench.editorAssociations` setting."
80
80
  )),
81
81
  enum: [NotebookEditorPriority.default, NotebookEditorPriority.option],
82
82
  markdownEnumDescriptions: [( localize(
83
- 17012,
83
+ 19509,
84
84
  "The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource."
85
85
  )), ( localize(
86
- 17013,
86
+ 19510,
87
87
  "The editor is not automatically used when the user opens a resource, but a user can switch to the editor using the `Reopen With` command."
88
88
  ))],
89
89
  default: "default"
@@ -98,7 +98,7 @@ const defaultRendererSnippet = ( Object.freeze({
98
98
  entrypoint: ""
99
99
  }));
100
100
  const notebookRendererContribution = {
101
- description: ( localize(17014, "Contributes notebook output renderer provider.")),
101
+ description: ( localize(19511, "Contributes notebook output renderer provider.")),
102
102
  type: "array",
103
103
  defaultSnippets: [{
104
104
  body: [defaultRendererSnippet]
@@ -113,11 +113,11 @@ const notebookRendererContribution = {
113
113
  properties: {
114
114
  [NotebookRendererContribution.id]: {
115
115
  type: "string",
116
- description: ( localize(17015, "Unique identifier of the notebook output renderer."))
116
+ description: ( localize(19512, "Unique identifier of the notebook output renderer."))
117
117
  },
118
118
  [NotebookRendererContribution.displayName]: {
119
119
  type: "string",
120
- description: ( localize(17016, "Human readable name of the notebook output renderer."))
120
+ description: ( localize(19513, "Human readable name of the notebook output renderer."))
121
121
  },
122
122
  [NotebookRendererContribution.hardDependencies]: {
123
123
  type: "array",
@@ -126,7 +126,7 @@ const notebookRendererContribution = {
126
126
  type: "string"
127
127
  },
128
128
  markdownDescription: ( localize(
129
- 17017,
129
+ 19514,
130
130
  "List of kernel dependencies the renderer requires. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer can be used."
131
131
  ))
132
132
  },
@@ -137,7 +137,7 @@ const notebookRendererContribution = {
137
137
  type: "string"
138
138
  },
139
139
  markdownDescription: ( localize(
140
- 17018,
140
+ 19515,
141
141
  "List of soft kernel dependencies the renderer can make use of. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer will be preferred over renderers that don't interact with the kernel."
142
142
  ))
143
143
  },
@@ -145,14 +145,14 @@ const notebookRendererContribution = {
145
145
  default: "never",
146
146
  enum: ["always", "optional", "never"],
147
147
  enumDescriptions: [( localize(
148
- 17019,
148
+ 19516,
149
149
  "Messaging is required. The renderer will only be used when it's part of an extension that can be run in an extension host."
150
150
  )), ( localize(
151
- 17020,
151
+ 19517,
152
152
  "The renderer is better with messaging available, but it's not required."
153
- )), ( localize(17021, "The renderer does not require messaging."))],
153
+ )), ( localize(19518, "The renderer does not require messaging."))],
154
154
  description: ( localize(
155
- 17022,
155
+ 19519,
156
156
  "Defines how and if the renderer needs to communicate with an extension host, via `createRendererMessaging`. Renderers with stronger messaging requirements may not work in all environments."
157
157
  ))
158
158
  }
@@ -166,13 +166,13 @@ const notebookRendererContribution = {
166
166
  properties: {
167
167
  [NotebookRendererContribution.mimeTypes]: {
168
168
  type: "array",
169
- description: ( localize(17023, "Set of globs that the notebook is for.")),
169
+ description: ( localize(19520, "Set of globs that the notebook is for.")),
170
170
  items: {
171
171
  type: "string"
172
172
  }
173
173
  },
174
174
  [NotebookRendererContribution.entrypoint]: {
175
- description: ( localize(17024, "File to load in the webview to render the extension.")),
175
+ description: ( localize(19521, "File to load in the webview to render the extension.")),
176
176
  type: "string"
177
177
  }
178
178
  }
@@ -180,17 +180,17 @@ const notebookRendererContribution = {
180
180
  required: [NotebookRendererContribution.entrypoint],
181
181
  properties: {
182
182
  [NotebookRendererContribution.entrypoint]: {
183
- description: ( localize(17024, "File to load in the webview to render the extension.")),
183
+ description: ( localize(19521, "File to load in the webview to render the extension.")),
184
184
  type: "object",
185
185
  required: ["extends", "path"],
186
186
  properties: {
187
187
  extends: {
188
188
  type: "string",
189
- description: ( localize(17025, "Existing renderer that this one extends."))
189
+ description: ( localize(19522, "Existing renderer that this one extends."))
190
190
  },
191
191
  path: {
192
192
  type: "string",
193
- description: ( localize(17024, "File to load in the webview to render the extension."))
193
+ description: ( localize(19521, "File to load in the webview to render the extension."))
194
194
  }
195
195
  }
196
196
  }
@@ -200,7 +200,7 @@ const notebookRendererContribution = {
200
200
  }
201
201
  };
202
202
  const notebookPreloadContribution = {
203
- description: ( localize(17026, "Contributes notebook preloads.")),
203
+ description: ( localize(19523, "Contributes notebook preloads.")),
204
204
  type: "array",
205
205
  defaultSnippets: [{
206
206
  body: [{
@@ -214,11 +214,11 @@ const notebookPreloadContribution = {
214
214
  properties: {
215
215
  [NotebookPreloadContribution.type]: {
216
216
  type: "string",
217
- description: ( localize(17027, "Type of the notebook."))
217
+ description: ( localize(19524, "Type of the notebook."))
218
218
  },
219
219
  [NotebookPreloadContribution.entrypoint]: {
220
220
  type: "string",
221
- description: ( localize(17028, "Path to file loaded in the webview."))
221
+ description: ( localize(19525, "Path to file loaded in the webview."))
222
222
  },
223
223
  [NotebookPreloadContribution.localResourceRoots]: {
224
224
  type: "array",
@@ -226,7 +226,7 @@ const notebookPreloadContribution = {
226
226
  type: "string"
227
227
  },
228
228
  description: ( localize(
229
- 17029,
229
+ 19526,
230
230
  "Paths to additional resources that should be allowed in the webview."
231
231
  ))
232
232
  }
@@ -278,7 +278,7 @@ class NotebooksDataRenderer extends Disposable {
278
278
  dispose: () => {}
279
279
  };
280
280
  }
281
- const headers = [( localize(17030, "ID")), ( localize(17031, "Name"))];
281
+ const headers = [( localize(19527, "ID")), ( localize(19528, "Name"))];
282
282
  const rows = contrib.sort((a, b) => a.type.localeCompare(b.type)).map(notebook => {
283
283
  return [notebook.type, notebook.displayName];
284
284
  });
@@ -310,7 +310,7 @@ class NotebookRenderersDataRenderer extends Disposable {
310
310
  dispose: () => {}
311
311
  };
312
312
  }
313
- const headers = [( localize(17032, "Name")), ( localize(17033, "Mimetypes"))];
313
+ const headers = [( localize(19529, "Name")), ( localize(19530, "Mimetypes"))];
314
314
  const rows = contrib.sort((a, b) => a.displayName.localeCompare(b.displayName)).map(notebookRenderer => {
315
315
  return [notebookRenderer.displayName, notebookRenderer.mimeTypes.join(",")];
316
316
  });
@@ -325,7 +325,7 @@ class NotebookRenderersDataRenderer extends Disposable {
325
325
  }
326
326
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
327
327
  id: "notebooks",
328
- label: ( localize(17034, "Notebooks")),
328
+ label: ( localize(19531, "Notebooks")),
329
329
  access: {
330
330
  canToggle: false
331
331
  },
@@ -333,7 +333,7 @@ class NotebookRenderersDataRenderer extends Disposable {
333
333
  });
334
334
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
335
335
  id: "notebookRenderer",
336
- label: ( localize(17035, "Notebook Renderers")),
336
+ label: ( localize(19532, "Notebook Renderers")),
337
337
  access: {
338
338
  canToggle: false
339
339
  },
@@ -142,7 +142,7 @@ let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
142
142
  if (this.input) {
143
143
  return this.input.getName();
144
144
  }
145
- return localize(17065, "Notebook Output Editor");
145
+ return localize(19562, "Notebook Output Editor");
146
146
  }
147
147
  async setInput(input, options, context, token) {
148
148
  await super.setInput(input, options, context, token);
@@ -202,13 +202,13 @@ let NotebookOutputEditor = class NotebookOutputEditor extends EditorPane {
202
202
  }
203
203
  _renderMissingRenderer(viewModel, preferredMimeType) {
204
204
  if (!viewModel.model.outputs.length) {
205
- return this._renderMessage(viewModel, ( localize(17066, "Cell has no output")));
205
+ return this._renderMessage(viewModel, ( localize(19563, "Cell has no output")));
206
206
  }
207
207
  if (!preferredMimeType) {
208
208
  const mimeTypes = viewModel.model.outputs.map(op => op.mime);
209
209
  const mimeTypesMessage = mimeTypes.join(", ");
210
210
  return this._renderMessage(viewModel, ( localize(
211
- 17067,
211
+ 19564,
212
212
  "No renderer could be found for output. It has the following mimetypes: {0}",
213
213
  mimeTypesMessage
214
214
  )));
@@ -81,7 +81,7 @@ let NotebookOutputEditorInput = class NotebookOutputEditorInput extends EditorIn
81
81
  };
82
82
  }
83
83
  getName() {
84
- return localize(17068, "Notebook Output Preview");
84
+ return localize(19565, "Notebook Output Preview");
85
85
  }
86
86
  get editorId() {
87
87
  return "notebookOutputEditor";
@@ -33,7 +33,7 @@ let NotebookExecutionService = class NotebookExecutionService {
33
33
  return;
34
34
  }
35
35
  this._logService.debug(`Execution`, `${JSON.stringify(cellsArr.map(c => c.handle))}`);
36
- const message = ( localize(17069, "Executing a notebook cell will run code from this workspace."));
36
+ const message = ( localize(19566, "Executing a notebook cell will run code from this workspace."));
37
37
  const trust = await this._workspaceTrustRequestService.requestWorkspaceTrust({
38
38
  message
39
39
  });
@@ -126,7 +126,7 @@ registerAction2(class extends Action2 {
126
126
  constructor() {
127
127
  super({
128
128
  id: "notebook.clearNotebookKernelsMRUCache",
129
- title: ( localize2(17070, "Clear Notebook Kernels MRU Cache")),
129
+ title: ( localize2(19567, "Clear Notebook Kernels MRU Cache")),
130
130
  category: Categories.Developer,
131
131
  f1: true
132
132
  });
@@ -23,7 +23,6 @@ export declare class NotebookKernelService extends Disposable implements INotebo
23
23
  private readonly _onDidChangeSourceActions;
24
24
  private readonly _onDidNotebookVariablesChange;
25
25
  private readonly _kernelSources;
26
- private readonly _kernelSourceActionsUpdates;
27
26
  private readonly _kernelDetectionTasks;
28
27
  private readonly _onDidChangeKernelDetectionTasks;
29
28
  private readonly _kernelSourceActionProviders;
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
- import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
+ import { Disposable, DisposableStore, DisposableMap, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
5
  import { ResourceMap, LRUCache } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
6
6
  import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
7
7
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
@@ -68,6 +68,12 @@ class SourceAction extends Disposable {
68
68
  }
69
69
  }
70
70
  }
71
+ class KernelInfoCache extends DisposableStore {
72
+ constructor() {
73
+ super(...arguments);
74
+ this.actions = [];
75
+ }
76
+ }
71
77
  let NotebookKernelService = class NotebookKernelService extends Disposable {
72
78
  static {
73
79
  NotebookKernelService_1 = this;
@@ -89,8 +95,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
89
95
  this._onDidChangeNotebookAffinity = this._register(( new Emitter()));
90
96
  this._onDidChangeSourceActions = this._register(( new Emitter()));
91
97
  this._onDidNotebookVariablesChange = this._register(( new Emitter()));
92
- this._kernelSources = ( new Map());
93
- this._kernelSourceActionsUpdates = ( new Map());
98
+ this._kernelSources = this._register(( new DisposableMap()));
94
99
  this._kernelDetectionTasks = ( new Map());
95
100
  this._onDidChangeKernelDetectionTasks = this._register(( new Emitter()));
96
101
  this._kernelSourceActionProviders = ( new Map());
@@ -108,8 +113,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
108
113
  if (kernelId && notebook.uri.scheme === Schemas.untitled) {
109
114
  this.selectKernelForNotebook(undefined, notebook);
110
115
  }
111
- this._kernelSourceActionsUpdates.get(id)?.dispose();
112
- this._kernelSourceActionsUpdates.delete(id);
116
+ this._kernelSources.deleteAndDispose(id);
113
117
  }));
114
118
  try {
115
119
  const data = JSON.parse(this._storageService.get(
@@ -122,14 +126,6 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
122
126
  }
123
127
  dispose() {
124
128
  this._kernels.clear();
125
- this._kernelSources.forEach(v => {
126
- v.menu.dispose();
127
- v.actions.forEach(a => a[1].dispose());
128
- });
129
- this._kernelSourceActionsUpdates.forEach(v => {
130
- v.dispose();
131
- });
132
- this._kernelSourceActionsUpdates.clear();
133
129
  super.dispose();
134
130
  }
135
131
  _persistMementos() {
@@ -277,7 +273,7 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
277
273
  const id = NotebookTextModelLikeId.str(notebook);
278
274
  const existingInfo = this._kernelSources.get(id);
279
275
  if (existingInfo) {
280
- return existingInfo.actions.filter(action => action[0].execution).map(action => action[0]);
276
+ return existingInfo.actions.filter(action => action.execution);
281
277
  }
282
278
  return [];
283
279
  }
@@ -286,16 +282,16 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
286
282
  const id = NotebookTextModelLikeId.str(notebook);
287
283
  const existingInfo = this._kernelSources.get(id);
288
284
  if (existingInfo) {
289
- return existingInfo.actions.map(a => a[0]);
285
+ return [...existingInfo.actions];
290
286
  }
291
- const sourceMenu = this._register(
287
+ const info = ( new KernelInfoCache());
288
+ const sourceMenu = info.add(
292
289
  this._menuService.createMenu(MenuId.NotebookKernelSource, contextKeyService)
293
290
  );
294
- const info = {
295
- menu: sourceMenu,
296
- actions: []
297
- };
291
+ const actionDisposables = info.add(( new DisposableStore()));
292
+ this._kernelSources.set(id, info);
298
293
  const loadActionsFromMenu = (menu, document) => {
294
+ actionDisposables.clear();
299
295
  const groups = menu.getActions({
300
296
  shouldForwardArgs: true
301
297
  });
@@ -303,29 +299,27 @@ let NotebookKernelService = class NotebookKernelService extends Disposable {
303
299
  groups.forEach(group => {
304
300
  const isPrimary = /^primary/.test(group[0]);
305
301
  group[1].forEach(action => {
306
- const sourceAction = ( new SourceAction(action, document, isPrimary));
307
- const stateChangeListener = sourceAction.onDidChangeState(() => {
302
+ const sourceAction = actionDisposables.add(( new SourceAction(action, document, isPrimary)));
303
+ actionDisposables.add(sourceAction.onDidChangeState(() => {
308
304
  this._onDidChangeSourceActions.fire({
309
305
  notebook: document.uri,
310
306
  viewType: document.notebookType
311
307
  });
312
- });
313
- sourceActions.push([sourceAction, stateChangeListener]);
308
+ }));
309
+ sourceActions.push(sourceAction);
314
310
  });
315
311
  });
316
312
  info.actions = sourceActions;
317
- this._kernelSources.set(id, info);
318
313
  this._onDidChangeSourceActions.fire({
319
314
  notebook: document.uri,
320
315
  viewType: document.notebookType
321
316
  });
322
317
  };
323
- this._kernelSourceActionsUpdates.get(id)?.dispose();
324
- this._kernelSourceActionsUpdates.set(id, sourceMenu.onDidChange(() => {
318
+ info.add(sourceMenu.onDidChange(() => {
325
319
  loadActionsFromMenu(sourceMenu, notebook);
326
320
  }));
327
321
  loadActionsFromMenu(sourceMenu, notebook);
328
- return info.actions.map(a => a[0]);
322
+ return [...info.actions];
329
323
  }
330
324
  registerNotebookKernelDetectionTask(task) {
331
325
  const notebookType = task.notebookType;
@@ -94,14 +94,14 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
94
94
  }
95
95
  };
96
96
  this.notificationService.prompt(Severity.Info, ( localize(
97
- 17071,
97
+ 19568,
98
98
  "Disable other keymaps ({0}) to avoid conflicts between keybindings?",
99
99
  distinct(oldKeymaps.map(k => k.local.manifest.displayName)).map(name => `'${name}'`).join(", ")
100
100
  )), [{
101
- label: ( localize(17072, "Yes")),
101
+ label: ( localize(19569, "Yes")),
102
102
  run: () => onPrompt(true)
103
103
  }, {
104
- label: ( localize(17073, "No")),
104
+ label: ( localize(19570, "No")),
105
105
  run: () => onPrompt(false)
106
106
  }]);
107
107
  }
@@ -13,7 +13,7 @@ let NotebookLoggingService = class NotebookLoggingService extends Disposable {
13
13
  constructor(loggerService) {
14
14
  super();
15
15
  this._logger = this._register(loggerService.createLogger(logChannelId, {
16
- name: ( localize(17074, "Notebook")),
16
+ name: ( localize(19571, "Notebook")),
17
17
  group: windowLogGroup
18
18
  }));
19
19
  }
@@ -675,7 +675,7 @@ let NotebookService = class NotebookService extends Disposable {
675
675
  const knownProvider = this.getViewTypeProvider(viewType);
676
676
  const actions = knownProvider ? [toAction({
677
677
  id: "workbench.notebook.action.installMissingViewType",
678
- label: ( localize(17075, "Install extension for '{0}'", viewType)),
678
+ label: ( localize(19572, "Install extension for '{0}'", viewType)),
679
679
  run: async () => {
680
680
  await this._instantiationService.createInstance(InstallRecommendedExtensionAction, knownProvider).run();
681
681
  }
@@ -93,7 +93,7 @@ let NotebookOutlineEntryFactory = class NotebookOutlineEntryFactory {
93
93
  }
94
94
  if (entries.length === 0) {
95
95
  if (preview.length === 0) {
96
- preview = ( localize(17108, "empty cell"));
96
+ preview = ( localize(19605, "empty cell"));
97
97
  }
98
98
  entries.push(( new OutlineEntry(
99
99
  index++,
@@ -232,7 +232,7 @@ registerAction2(class extends Action2 {
232
232
  constructor() {
233
233
  super({
234
234
  id: "repl.focusLastItemExecuted",
235
- title: ( localize2(17862, "Focus Most Recent REPL Execution")),
235
+ title: ( localize2(20398, "Focus Most Recent REPL Execution")),
236
236
  category: "REPL",
237
237
  menu: {
238
238
  id: MenuId.CommandPalette,
@@ -282,7 +282,7 @@ registerAction2(class extends Action2 {
282
282
  constructor() {
283
283
  super({
284
284
  id: "repl.input.focus",
285
- title: ( localize2(17863, "Focus Input Editor")),
285
+ title: ( localize2(20399, "Focus Input Editor")),
286
286
  category: "REPL",
287
287
  menu: {
288
288
  id: MenuId.CommandPalette,
@@ -327,7 +327,7 @@ registerAction2(class extends Action2 {
327
327
  constructor() {
328
328
  super({
329
329
  id: "repl.execute",
330
- title: ( localize2(17864, "Execute REPL input")),
330
+ title: ( localize2(20400, "Execute REPL input")),
331
331
  category: "REPL",
332
332
  keybinding: [{
333
333
  when: ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( ContextKeyExpr.equals("activeEditor", "workbench.editor.repl")), ( NOTEBOOK_CELL_LIST_FOCUSED.negate()))),
@@ -19,28 +19,28 @@ class ReplEditorInputAccessibilityHelp {
19
19
  }
20
20
  function getAccessibilityInputHelpText() {
21
21
  return [( localize(
22
- 17866,
22
+ 20402,
23
23
  "You are in a REPL Editor Input box which will accept code to be executed in the REPL."
24
24
  )), ( localize(
25
- 17867,
25
+ 20403,
26
26
  "The Execute command{0} will evaluate the expression in the input box.",
27
27
  "<keybinding:repl.execute>"
28
28
  )), ( localize(
29
- 17868,
29
+ 20404,
30
30
  "The setting `accessibility.replEditor.readLastExecutionOutput` controls if output will be automatically read when execution completes."
31
31
  )), ( localize(
32
- 17869,
32
+ 20405,
33
33
  "The setting `accessibility.replEditor.autoFocusReplExecution` controls if focus will automatically move to the REPL after executing code."
34
34
  )), ( localize(
35
- 17870,
35
+ 20406,
36
36
  "The Focus Last executed command{0} will move focus to the last executed item in the REPL history.",
37
37
  "<keybinding:repl.focusLastItemExecuted>"
38
38
  )), ( localize(
39
- 17871,
39
+ 20407,
40
40
  "When you run the Open Accessbility View command{0} from this input box, the output from the last execution will be shown in the accessibility view.",
41
41
  "<keybinding:editor.action.accessibleView>"
42
42
  )), ( localize(
43
- 17872,
43
+ 20408,
44
44
  "The Focus Input Editor command{0} will bring the focus back to this editor.",
45
45
  "<keybinding:repl.input.focus>"
46
46
  ))].join("\n");
@@ -58,30 +58,30 @@ class ReplEditorHistoryAccessibilityHelp {
58
58
  }
59
59
  function getAccessibilityHistoryHelpText() {
60
60
  return [( localize(
61
- 17873,
61
+ 20409,
62
62
  "You are in a REPL History which is a list of cells that have been executed in the REPL. Each cell has an input, an output, and the cell container."
63
63
  )), ( localize(
64
- 17874,
64
+ 20410,
65
65
  "The Edit Cell command{0} will move focus to the read-only editor for the input of the cell.",
66
66
  "<keybinding:notebook.cell.edit>"
67
67
  )), ( localize(
68
- 17875,
68
+ 20411,
69
69
  "The Quit Edit command{0} will move focus to the cell container, where the up and down arrows will also move focus between cells in the history.",
70
70
  "<keybinding:notebook.cell.quitEdit>"
71
71
  )), ( localize(
72
- 17876,
72
+ 20412,
73
73
  "Run the Open Accessbility View command{0} while navigating the history for an accessible view of the item's output.",
74
74
  "<keybinding:editor.action.accessibleView>"
75
75
  )), ( localize(
76
- 17877,
76
+ 20413,
77
77
  "The Focus Output command{0} will set focus on the output when focused on a previously executed item.",
78
78
  "<keybinding:notebook.cell.focusInOutput>"
79
79
  )), ( localize(
80
- 17878,
80
+ 20414,
81
81
  "The Focus Input Editor command{0} will move focus to the REPL input box.",
82
82
  "<keybinding:repl.input.focus>"
83
83
  )), ( localize(
84
- 17870,
84
+ 20406,
85
85
  "The Focus Last executed command{0} will move focus to the last executed item in the REPL history.",
86
86
  "<keybinding:repl.focusLastItemExecuted>"
87
87
  ))].join("\n");
@@ -6,7 +6,7 @@ import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/
6
6
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
7
7
  import { ISaveOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
8
8
  import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
9
- import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
9
+ import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService";
10
10
  import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
11
11
  import { IStoredFileWorkingCopy, IStoredFileWorkingCopyModel, IStoredFileWorkingCopyModelFactory, IStoredFileWorkingCopyResolveOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
12
12
  import { IStoredFileWorkingCopyManager, IStoredFileWorkingCopyManagerResolveOptions } from "./storedFileWorkingCopyManager.js";