@codingame/monaco-vscode-notebook-service-override 15.0.2 → 16.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 (84) hide show
  1. package/index.js +5 -11
  2. package/package.json +27 -26
  3. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css +6 -0
  4. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +10 -10
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +22 -22
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +1 -0
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +7 -3
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +5 -5
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +7 -3
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +3 -3
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +7 -7
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +12 -3
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +10 -10
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css +17 -0
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +4 -4
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +5 -5
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +2 -2
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +6 -6
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +14 -14
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +1 -1
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +1 -1
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +2 -2
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +10 -10
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +13 -13
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +3 -3
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +28 -28
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +54 -31
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +25 -25
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +26 -26
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +25 -25
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +18 -18
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +7 -7
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +12 -12
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +2 -2
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +22 -22
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +72 -74
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +11 -11
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +1 -1
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +2 -2
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +3 -3
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +54 -12
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +4 -3
  51. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +2 -0
  52. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +42 -1
  53. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +10 -2
  54. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.d.ts +15 -0
  55. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookCellMatching.js +173 -0
  56. package/vscode/src/vs/workbench/contrib/notebook/common/services/{notebookSimpleWorker.d.ts → notebookWebWorker.d.ts} +24 -6
  57. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +366 -0
  58. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorkerMain.js +5 -0
  59. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
  60. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
  61. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +2 -2
  62. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +1 -1
  63. package/worker.js +1 -1
  64. package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.css.js +0 -6
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/contribution.js +0 -10
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookCellDecorators.d.ts +0 -24
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookCellDecorators.js +0 -332
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatActionsOverlay.d.ts +0 -23
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatActionsOverlay.js +0 -299
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditController.d.ts +0 -9
  71. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditController.js +0 -179
  72. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalCellModelFactory.d.ts +0 -21
  73. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalCellModelFactory.js +0 -42
  74. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalModelRefFactory.d.ts +0 -25
  75. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalModelRefFactory.js +0 -77
  76. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.d.ts +0 -64
  77. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.js +0 -443
  78. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +0 -20
  79. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +0 -86
  80. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/media/notebookFind.css.js +0 -6
  81. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +0 -279
  82. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.d.ts +0 -1
  83. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorkerMain.js +0 -5
  84. /package/vscode/src/vs/workbench/contrib/notebook/{browser/contrib/chatEdit/contribution.d.ts → common/services/notebookWebWorkerMain.d.ts} +0 -0
@@ -28,7 +28,7 @@ const NotebookPreloadContribution = ( Object.freeze({
28
28
  localResourceRoots: 'localResourceRoots',
29
29
  }));
30
30
  const notebookProviderContribution = {
31
- description: ( localize(7954, 'Contributes notebook document provider.')),
31
+ description: ( localize(8229, 'Contributes notebook document provider.')),
32
32
  type: 'array',
33
33
  defaultSnippets: [{ body: [{ type: '', displayName: '', 'selector': [{ 'filenamePattern': '' }] }] }],
34
34
  items: {
@@ -41,25 +41,25 @@ const notebookProviderContribution = {
41
41
  properties: {
42
42
  [NotebookEditorContribution.type]: {
43
43
  type: 'string',
44
- description: ( localize(7955, 'Type of the notebook.')),
44
+ description: ( localize(8230, 'Type of the notebook.')),
45
45
  },
46
46
  [NotebookEditorContribution.displayName]: {
47
47
  type: 'string',
48
- description: ( localize(7956, 'Human readable name of the notebook.')),
48
+ description: ( localize(8231, 'Human readable name of the notebook.')),
49
49
  },
50
50
  [NotebookEditorContribution.selector]: {
51
51
  type: 'array',
52
- description: ( localize(7957, 'Set of globs that the notebook is for.')),
52
+ description: ( localize(8232, 'Set of globs that the notebook is for.')),
53
53
  items: {
54
54
  type: 'object',
55
55
  properties: {
56
56
  filenamePattern: {
57
57
  type: 'string',
58
- description: ( localize(7958, 'Glob that the notebook is enabled for.')),
58
+ description: ( localize(8233, 'Glob that the notebook is enabled for.')),
59
59
  },
60
60
  excludeFileNamePattern: {
61
61
  type: 'string',
62
- description: ( localize(7959, 'Glob that the notebook is disabled for.'))
62
+ description: ( localize(8234, 'Glob that the notebook is disabled for.'))
63
63
  }
64
64
  }
65
65
  }
@@ -67,7 +67,7 @@ const notebookProviderContribution = {
67
67
  [NotebookEditorContribution.priority]: {
68
68
  type: 'string',
69
69
  markdownDeprecationMessage: ( localize(
70
- 7960,
70
+ 8235,
71
71
  '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.'
72
72
  )),
73
73
  enum: [
@@ -76,11 +76,11 @@ const notebookProviderContribution = {
76
76
  ],
77
77
  markdownEnumDescriptions: [
78
78
  ( localize(
79
- 7961,
79
+ 8236,
80
80
  'The editor is automatically used when the user opens a resource, provided that no other default custom editors are registered for that resource.'
81
81
  )),
82
82
  ( localize(
83
- 7962,
83
+ 8237,
84
84
  '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.'
85
85
  )),
86
86
  ],
@@ -91,7 +91,7 @@ const notebookProviderContribution = {
91
91
  };
92
92
  const defaultRendererSnippet = ( Object.freeze({ id: '', displayName: '', mimeTypes: [''], entrypoint: '' }));
93
93
  const notebookRendererContribution = {
94
- description: ( localize(7963, 'Contributes notebook output renderer provider.')),
94
+ description: ( localize(8238, 'Contributes notebook output renderer provider.')),
95
95
  type: 'array',
96
96
  defaultSnippets: [{ body: [defaultRendererSnippet] }],
97
97
  items: {
@@ -106,18 +106,18 @@ const notebookRendererContribution = {
106
106
  properties: {
107
107
  [NotebookRendererContribution.id]: {
108
108
  type: 'string',
109
- description: ( localize(7964, 'Unique identifier of the notebook output renderer.')),
109
+ description: ( localize(8239, 'Unique identifier of the notebook output renderer.')),
110
110
  },
111
111
  [NotebookRendererContribution.displayName]: {
112
112
  type: 'string',
113
- description: ( localize(7965, 'Human readable name of the notebook output renderer.')),
113
+ description: ( localize(8240, 'Human readable name of the notebook output renderer.')),
114
114
  },
115
115
  [NotebookRendererContribution.hardDependencies]: {
116
116
  type: 'array',
117
117
  uniqueItems: true,
118
118
  items: { type: 'string' },
119
119
  markdownDescription: ( localize(
120
- 7966,
120
+ 8241,
121
121
  'List of kernel dependencies the renderer requires. If any of the dependencies are present in the `NotebookKernel.preloads`, the renderer can be used.'
122
122
  )),
123
123
  },
@@ -126,7 +126,7 @@ const notebookRendererContribution = {
126
126
  uniqueItems: true,
127
127
  items: { type: 'string' },
128
128
  markdownDescription: ( localize(
129
- 7967,
129
+ 8242,
130
130
  '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.'
131
131
  )),
132
132
  },
@@ -139,17 +139,17 @@ const notebookRendererContribution = {
139
139
  ],
140
140
  enumDescriptions: [
141
141
  ( localize(
142
- 7968,
142
+ 8243,
143
143
  'Messaging is required. The renderer will only be used when it\'s part of an extension that can be run in an extension host.'
144
144
  )),
145
145
  ( localize(
146
- 7969,
146
+ 8244,
147
147
  'The renderer is better with messaging available, but it\'s not requried.'
148
148
  )),
149
- ( localize(7970, 'The renderer does not require messaging.')),
149
+ ( localize(8245, 'The renderer does not require messaging.')),
150
150
  ],
151
151
  description: ( localize(
152
- 7971,
152
+ 8246,
153
153
  '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.'
154
154
  )),
155
155
  },
@@ -165,13 +165,13 @@ const notebookRendererContribution = {
165
165
  properties: {
166
166
  [NotebookRendererContribution.mimeTypes]: {
167
167
  type: 'array',
168
- description: ( localize(7972, 'Set of globs that the notebook is for.')),
168
+ description: ( localize(8247, 'Set of globs that the notebook is for.')),
169
169
  items: {
170
170
  type: 'string'
171
171
  }
172
172
  },
173
173
  [NotebookRendererContribution.entrypoint]: {
174
- description: ( localize(7973, 'File to load in the webview to render the extension.')),
174
+ description: ( localize(8248, 'File to load in the webview to render the extension.')),
175
175
  type: 'string',
176
176
  },
177
177
  }
@@ -182,17 +182,17 @@ const notebookRendererContribution = {
182
182
  ],
183
183
  properties: {
184
184
  [NotebookRendererContribution.entrypoint]: {
185
- description: ( localize(7973, 'File to load in the webview to render the extension.')),
185
+ description: ( localize(8248, 'File to load in the webview to render the extension.')),
186
186
  type: 'object',
187
187
  required: ['extends', 'path'],
188
188
  properties: {
189
189
  extends: {
190
190
  type: 'string',
191
- description: ( localize(7974, 'Existing renderer that this one extends.')),
191
+ description: ( localize(8249, 'Existing renderer that this one extends.')),
192
192
  },
193
193
  path: {
194
194
  type: 'string',
195
- description: ( localize(7973, 'File to load in the webview to render the extension.')),
195
+ description: ( localize(8248, 'File to load in the webview to render the extension.')),
196
196
  },
197
197
  }
198
198
  },
@@ -204,7 +204,7 @@ const notebookRendererContribution = {
204
204
  }
205
205
  };
206
206
  const notebookPreloadContribution = {
207
- description: ( localize(7975, 'Contributes notebook preloads.')),
207
+ description: ( localize(8250, 'Contributes notebook preloads.')),
208
208
  type: 'array',
209
209
  defaultSnippets: [{ body: [{ type: '', entrypoint: '' }] }],
210
210
  items: {
@@ -216,17 +216,17 @@ const notebookPreloadContribution = {
216
216
  properties: {
217
217
  [NotebookPreloadContribution.type]: {
218
218
  type: 'string',
219
- description: ( localize(7976, 'Type of the notebook.')),
219
+ description: ( localize(8251, 'Type of the notebook.')),
220
220
  },
221
221
  [NotebookPreloadContribution.entrypoint]: {
222
222
  type: 'string',
223
- description: ( localize(7977, 'Path to file loaded in the webview.')),
223
+ description: ( localize(8252, 'Path to file loaded in the webview.')),
224
224
  },
225
225
  [NotebookPreloadContribution.localResourceRoots]: {
226
226
  type: 'array',
227
227
  items: { type: 'string' },
228
228
  description: ( localize(
229
- 7978,
229
+ 8253,
230
230
  'Paths to additional resources that should be allowed in the webview.'
231
231
  )),
232
232
  },
@@ -273,8 +273,8 @@ class NotebooksDataRenderer extends Disposable {
273
273
  return { data: { headers: [], rows: [] }, dispose: () => { } };
274
274
  }
275
275
  const headers = [
276
- ( localize(7979, "ID")),
277
- ( localize(7980, "Name")),
276
+ ( localize(8254, "ID")),
277
+ ( localize(8255, "Name")),
278
278
  ];
279
279
  const rows = ( contrib
280
280
  .sort((a, b) => a.type.localeCompare(b.type))
@@ -307,8 +307,8 @@ class NotebookRenderersDataRenderer extends Disposable {
307
307
  return { data: { headers: [], rows: [] }, dispose: () => { } };
308
308
  }
309
309
  const headers = [
310
- ( localize(7981, "Name")),
311
- ( localize(7982, "Mimetypes")),
310
+ ( localize(8256, "Name")),
311
+ ( localize(8257, "Mimetypes")),
312
312
  ];
313
313
  const rows = ( contrib
314
314
  .sort((a, b) => a.displayName.localeCompare(b.displayName))
@@ -329,7 +329,7 @@ class NotebookRenderersDataRenderer extends Disposable {
329
329
  }
330
330
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
331
331
  id: 'notebooks',
332
- label: ( localize(7983, "Notebooks")),
332
+ label: ( localize(8258, "Notebooks")),
333
333
  access: {
334
334
  canToggle: false
335
335
  },
@@ -337,7 +337,7 @@ class NotebookRenderersDataRenderer extends Disposable {
337
337
  });
338
338
  ( Registry.as(Extensions.ExtensionFeaturesRegistry)).registerExtensionFeature({
339
339
  id: 'notebookRenderer',
340
- label: ( localize(7984, "Notebook Renderers")),
340
+ label: ( localize(8259, "Notebook Renderers")),
341
341
  access: {
342
342
  canToggle: false
343
343
  },
@@ -10,10 +10,10 @@ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/even
10
10
  import { GroupModelChangeKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
11
11
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
12
12
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
13
- import { MOST_RECENT_REPL_EDITOR, InteractiveWindowOpen } from '@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
13
+ import { MOST_RECENT_REPL_EDITOR, InteractiveWindowOpen } from '@codingame/monaco-vscode-a1eb43d5-da63-5f76-8ad4-acf0d6c3b749-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
14
14
  import { ServiceCollection } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/serviceCollection';
15
15
  import { IEditorProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platform/progress/common/progress.service';
16
- import { NotebookDiffEditorInput } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/common/notebookDiffEditorInput';
16
+ import { NotebookDiffEditorInput } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/notebook/common/notebookDiffEditorInput';
17
17
 
18
18
  let NotebookEditorWidgetService = class NotebookEditorWidgetService {
19
19
  constructor(editorGroupService, editorService, contextKeyService, instantiationService) {
@@ -27,7 +27,7 @@ let NotebookExecutionService = class NotebookExecutionService {
27
27
  return;
28
28
  }
29
29
  this._logService.debug(`Execution`, `${JSON.stringify(( cellsArr.map(c => c.handle)))}`);
30
- const message = ( localize(8013, "Executing a notebook cell will run code from this workspace."));
30
+ const message = ( localize(8288, "Executing a notebook cell will run code from this workspace."));
31
31
  const trust = await this._workspaceTrustRequestService.requestWorkspaceTrust({ message });
32
32
  if (!trust) {
33
33
  return;
@@ -114,7 +114,7 @@ registerAction2(class extends Action2 {
114
114
  constructor() {
115
115
  super({
116
116
  id: 'notebook.clearNotebookKernelsMRUCache',
117
- title: ( localize2(8014, "Clear Notebook Kernels MRU Cache")),
117
+ title: ( localize2(8289, "Clear Notebook Kernels MRU Cache")),
118
118
  category: Categories.Developer,
119
119
  f1: true
120
120
  });
@@ -75,14 +75,14 @@ let NotebookKeymapService = class NotebookKeymapService extends Disposable {
75
75
  }
76
76
  };
77
77
  this.notificationService.prompt(Severity.Info, ( localize(
78
- 8015,
78
+ 8290,
79
79
  "Disable other keymaps ({0}) to avoid conflicts between keybindings?",
80
80
  ( distinct(( oldKeymaps.map(k => k.local.manifest.displayName))).map(name => `'${name}'`)).join(', ')
81
81
  )), [{
82
- label: ( localize(8016, "Yes")),
82
+ label: ( localize(8291, "Yes")),
83
83
  run: () => onPrompt(true)
84
84
  }, {
85
- label: ( localize(8017, "No")),
85
+ label: ( localize(8292, "No")),
86
86
  run: () => onPrompt(false)
87
87
  }]);
88
88
  }
@@ -10,7 +10,7 @@ let NotebookLoggingService = class NotebookLoggingService extends Disposable {
10
10
  static { this.ID = 'notebook'; }
11
11
  constructor(loggerService) {
12
12
  super();
13
- this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localize(8018, "Notebook")), group: windowLogGroup }));
13
+ this._logger = this._register(loggerService.createLogger(logChannelId, { name: ( localize(8293, "Notebook")), group: windowLogGroup }));
14
14
  }
15
15
  debug(category, output) {
16
16
  this._logger.debug(`[${category}] ${output}`);
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
4
  import { toAction } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
5
5
  import { createErrorWithActions } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
6
- import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
6
+ import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
7
7
  import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
8
8
  import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
9
9
  import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
@@ -20,7 +20,7 @@ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode
20
20
  import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
21
21
  import { Memento } from '@codingame/monaco-vscode-12c5f9eb-72d3-57ca-babd-5bef7aa9de3b-common/vscode/vs/workbench/common/memento';
22
22
  import { notebooksExtensionPoint, notebookRendererExtensionPoint, notebookPreloadExtensionPoint } from '../notebookExtensionPoint.js';
23
- import { NotebookDiffEditorInput } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/common/notebookDiffEditorInput';
23
+ import { NotebookDiffEditorInput } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/notebook/common/notebookDiffEditorInput';
24
24
  import { NotebookTextModel } from '../../common/model/notebookTextModel.js';
25
25
  import { NotebookEditorPriority, NotebookSetting, CellUri, NotebookRendererMatch, RENDERER_EQUIVALENT_EXTENSIONS, RENDERER_NOT_AVAILABLE, MimeTypeDisplayOrder, ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER, NOTEBOOK_DISPLAY_ORDER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
26
26
  import { NotebookEditorInput } from '@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
@@ -37,7 +37,7 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
37
37
  import { INotebookDocumentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/notebook/common/notebookDocumentService.service';
38
38
  import { MergeEditorInput } from '@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
39
39
  import { streamToBuffer, VSBuffer, bufferToStream } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
40
- import { NotebookMultiDiffEditorInput } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput';
40
+ import { NotebookMultiDiffEditorInput } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookMultiDiffEditorInput';
41
41
  import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
42
42
 
43
43
  var NotebookProviderInfoStore_1, NotebookService_1;
@@ -141,16 +141,33 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
141
141
  };
142
142
  const notebookEditorOptions = {
143
143
  canHandleDiff: () => !!this._configurationService.getValue(NotebookSetting.textDiffEditorPreview) && !this._accessibilityService.isScreenReaderOptimized(),
144
- canSupportResource: (resource) => resource.scheme === Schemas.untitled || resource.scheme === Schemas.vscodeNotebookCell || this._fileService.hasProvider(resource)
144
+ canSupportResource: (resource) => {
145
+ if (resource.scheme === Schemas.vscodeNotebookCellOutput) {
146
+ const params = ( new URLSearchParams(resource.query));
147
+ return params.get('openIn') === 'notebook';
148
+ }
149
+ return resource.scheme === Schemas.untitled || resource.scheme === Schemas.vscodeNotebookCell || this._fileService.hasProvider(resource);
150
+ }
145
151
  };
146
- const notebookEditorInputFactory = ({ resource, options }) => {
147
- const data = CellUri.parse(resource);
152
+ const notebookEditorInputFactory = async ({ resource, options }) => {
153
+ let data;
154
+ if (resource.scheme === Schemas.vscodeNotebookCellOutput) {
155
+ const outputUriData = CellUri.parseCellOutputUri(resource);
156
+ if (!outputUriData || !outputUriData.notebook || outputUriData.cellHandle === undefined) {
157
+ throw ( new Error('Invalid cell output uri'));
158
+ }
159
+ data = {
160
+ notebook: outputUriData.notebook,
161
+ handle: outputUriData.cellHandle
162
+ };
163
+ }
164
+ else {
165
+ data = CellUri.parse(resource);
166
+ }
148
167
  let notebookUri;
149
168
  let cellOptions;
150
- let preferredResource = resource;
151
169
  if (data) {
152
170
  notebookUri = this.uriIdentService.asCanonicalUri(data.notebook);
153
- preferredResource = data.notebook;
154
171
  cellOptions = { resource, options };
155
172
  }
156
173
  else {
@@ -159,13 +176,38 @@ let NotebookProviderInfoStore = class NotebookProviderInfoStore extends Disposab
159
176
  if (!cellOptions) {
160
177
  cellOptions = options?.cellOptions;
161
178
  }
162
- const notebookOptions = { ...options, cellOptions, viewState: undefined };
163
- const editor = NotebookEditorInput.getOrCreate(this._instantiationService, notebookUri, preferredResource, notebookProviderInfo.id);
179
+ let notebookOptions;
180
+ if (resource.scheme === Schemas.vscodeNotebookCellOutput) {
181
+ if (data?.handle === undefined || !data?.notebook) {
182
+ throw ( new Error('Invalid cell handle'));
183
+ }
184
+ const cellUri = CellUri.generate(data.notebook, data.handle);
185
+ cellOptions = { resource: cellUri, options };
186
+ const cellIndex = await this._notebookEditorModelResolverService.resolve(notebookUri)
187
+ .then(model => model.object.notebook.cells.findIndex(cell => cell.handle === data?.handle))
188
+ .then(index => index >= 0 ? index : 0);
189
+ const cellIndexesToRanges = [{ start: cellIndex, end: cellIndex + 1 }];
190
+ notebookOptions = {
191
+ ...options,
192
+ cellOptions,
193
+ viewState: undefined,
194
+ cellSelections: cellIndexesToRanges
195
+ };
196
+ }
197
+ else {
198
+ notebookOptions = {
199
+ ...options,
200
+ cellOptions,
201
+ viewState: undefined,
202
+ };
203
+ }
204
+ const preferredResourceParam = cellOptions?.resource;
205
+ const editor = NotebookEditorInput.getOrCreate(this._instantiationService, notebookUri, preferredResourceParam, notebookProviderInfo.id);
164
206
  return { editor, options: notebookOptions };
165
207
  };
166
208
  const notebookUntitledEditorFactory = async ({ resource, options }) => {
167
209
  const ref = await this._notebookEditorModelResolverService.resolve({ untitledResource: resource }, notebookProviderInfo.id);
168
- ref.object.notebook.onWillDispose(() => {
210
+ Event.once(ref.object.notebook.onWillDispose)(() => {
169
211
  ref.dispose();
170
212
  });
171
213
  return { editor: NotebookEditorInput.getOrCreate(this._instantiationService, ref.object.resource, undefined, notebookProviderInfo.id), options };
@@ -548,7 +590,7 @@ let NotebookService = class NotebookService extends Disposable {
548
590
  const knownProvider = this.getViewTypeProvider(viewType);
549
591
  const actions = knownProvider ? [
550
592
  toAction({
551
- id: 'workbench.notebook.action.installMissingViewType', label: ( localize(8019, "Install extension for '{0}'", viewType)), run: async () => {
593
+ id: 'workbench.notebook.action.installMissingViewType', label: ( localize(8294, "Install extension for '{0}'", viewType)), run: async () => {
552
594
  await this._instantiationService.createInstance(InstallRecommendedExtensionAction, knownProvider).run();
553
595
  }
554
596
  })
@@ -1,12 +1,12 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { Disposable, DisposableStore, toDisposable, dispose } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
- import { createWebWorker } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/defaultWorkerFactory';
4
+ import { createWebWorker } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/webWorkerFactory';
5
5
  import { CellUri, NotebookCellsChangeType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
6
6
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
7
7
  import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
8
8
  import { TextModel } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model/textModel';
9
- import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
9
+ import { Schemas, FileAccess } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
10
10
  import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
11
11
 
12
12
  let NotebookEditorWorkerServiceImpl = class NotebookEditorWorkerServiceImpl extends Disposable {
@@ -42,6 +42,7 @@ class WorkerManager extends Disposable {
42
42
  withWorker() {
43
43
  if (!this._editorWorkerClient) {
44
44
  this._editorWorkerClient = ( new NotebookWorkerClient(this._notebookService, this._modelService));
45
+ this._register(this._editorWorkerClient);
45
46
  }
46
47
  return Promise.resolve(this._editorWorkerClient);
47
48
  }
@@ -214,7 +215,7 @@ class NotebookWorkerClient extends Disposable {
214
215
  _getOrCreateWorker() {
215
216
  if (!this._worker) {
216
217
  try {
217
- this._worker = this._register(createWebWorker('vs/workbench/contrib/notebook/common/services/notebookSimpleWorker', 'NotebookEditorWorker'));
218
+ this._worker = this._register(createWebWorker(( FileAccess.asBrowserUri('vs/workbench/contrib/notebook/common/services/notebookWebWorkerMain.js')), 'NotebookEditorWorker'));
218
219
  }
219
220
  catch (err) {
220
221
  throw (err);
@@ -59,6 +59,8 @@ export declare class NotebookTextModel extends Disposable implements INotebookTe
59
59
  private static _computeOutputEdit;
60
60
  private static _commonPrefix;
61
61
  private static _commonSuffix;
62
+ private newCellsFromLastEdit;
63
+ private isOnlyEditingMetadataOnNewCells;
62
64
  applyEdits(rawEdits: ICellEditOperation[], synchronous: boolean, beginSelectionState: ISelectionState | undefined, endSelectionsComputer: () => ISelectionState | undefined, undoRedoGroup: UndoRedoGroup | undefined, computeUndoRedo: boolean): boolean;
63
65
  private _doApplyEdits;
64
66
  private _mergeCellEdits;
@@ -37,6 +37,7 @@ class StackOperation {
37
37
  this.undoRedoGroup = undoRedoGroup;
38
38
  this._pauseableEmitter = _pauseableEmitter;
39
39
  this._postUndoRedo = _postUndoRedo;
40
+ this.tag = 'notebookUndoRedoElement';
40
41
  this._operations = [];
41
42
  this._beginSelectionState = undefined;
42
43
  this._resultSelectionState = undefined;
@@ -107,6 +108,7 @@ class NotebookOperationManager {
107
108
  this._pauseableEmitter = _pauseableEmitter;
108
109
  this._postUndoRedo = _postUndoRedo;
109
110
  this._pendingStackOperation = null;
111
+ this._isAppending = false;
110
112
  }
111
113
  isUndoStackEmpty() {
112
114
  return this._pendingStackOperation === null || this._pendingStackOperation.isEmpty;
@@ -114,8 +116,11 @@ class NotebookOperationManager {
114
116
  pushStackElement(alternativeVersionId, selectionState) {
115
117
  if (this._pendingStackOperation && !this._pendingStackOperation.isEmpty) {
116
118
  this._pendingStackOperation.pushEndState(alternativeVersionId, selectionState);
117
- this._undoService.pushElement(this._pendingStackOperation, this._pendingStackOperation.undoRedoGroup);
119
+ if (!this._isAppending) {
120
+ this._undoService.pushElement(this._pendingStackOperation, this._pendingStackOperation.undoRedoGroup);
121
+ }
118
122
  }
123
+ this._isAppending = false;
119
124
  this._pendingStackOperation = null;
120
125
  }
121
126
  _getOrCreateEditStackElement(beginSelectionState, undoRedoGroup, alternativeVersionId) {
@@ -128,6 +133,15 @@ class NotebookOperationManager {
128
133
  alternativeVersionId || ''
129
134
  ));
130
135
  }
136
+ appendPreviousOperation() {
137
+ const previous = this._undoService.getLastElement(this._textModel.uri);
138
+ if (previous && previous.tag === 'notebookUndoRedoElement') {
139
+ this._pendingStackOperation = previous;
140
+ this._isAppending = true;
141
+ return true;
142
+ }
143
+ return false;
144
+ }
131
145
  pushEditOperation(element, beginSelectionState, resultSelectionState, alternativeVersionId, undoRedoGroup) {
132
146
  const pendingStackOperation = this._getOrCreateEditStackElement(beginSelectionState, undoRedoGroup, alternativeVersionId);
133
147
  pendingStackOperation.pushEditOperation(element, beginSelectionState, resultSelectionState, alternativeVersionId);
@@ -188,6 +202,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
188
202
  this._versionId = 0;
189
203
  this._notebookSpecificAlternativeId = 0;
190
204
  this._alternativeVersionId = '1';
205
+ this.newCellsFromLastEdit = ( new Set());
191
206
  this.transientOptions = options;
192
207
  this.metadata = metadata;
193
208
  this._initialize(cells);
@@ -480,9 +495,34 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
480
495
  }
481
496
  return result;
482
497
  }
498
+ isOnlyEditingMetadataOnNewCells(rawEdits) {
499
+ for (const edit of rawEdits) {
500
+ if (edit.editType === CellEditType.PartialInternalMetadata) {
501
+ continue;
502
+ }
503
+ if (edit.editType !== CellEditType.Metadata && edit.editType !== CellEditType.PartialMetadata) {
504
+ return false;
505
+ }
506
+ if (('index' in edit) && !( this.newCellsFromLastEdit.has(this.cells[edit.index].handle))) {
507
+ return false;
508
+ }
509
+ if ('handle' in edit && !( this.newCellsFromLastEdit.has(edit.handle))) {
510
+ return false;
511
+ }
512
+ }
513
+ return true;
514
+ }
483
515
  applyEdits(rawEdits, synchronous, beginSelectionState, endSelectionsComputer, undoRedoGroup, computeUndoRedo) {
484
516
  this._pauseableEmitter.pause();
485
517
  this._operationManager.pushStackElement(this._alternativeVersionId, undefined);
518
+ if (computeUndoRedo && this.isOnlyEditingMetadataOnNewCells(rawEdits)) {
519
+ if (!this._operationManager.appendPreviousOperation()) {
520
+ computeUndoRedo = false;
521
+ }
522
+ }
523
+ else if (computeUndoRedo) {
524
+ this.newCellsFromLastEdit.clear();
525
+ }
486
526
  try {
487
527
  this._doApplyEdits(rawEdits, synchronous, computeUndoRedo, beginSelectionState, undoRedoGroup);
488
528
  return true;
@@ -697,6 +737,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
697
737
  const dirtyStateListener = cell.onDidChangeContent((e) => {
698
738
  this._bindCellContentHandler(cell, e);
699
739
  });
740
+ this.newCellsFromLastEdit.add(cell.handle);
700
741
  this._cellListeners.set(cell.handle, dirtyStateListener);
701
742
  this._register(cell);
702
743
  return cell;
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
3
3
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
4
4
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
5
5
  import { NotebookWorkingCopyTypeIdentifier, NotebookSetting, CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
6
- import { NotebookFileWorkingCopyModelFactory, SimpleNotebookEditorModel } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
6
+ import { NotebookFileWorkingCopyModelFactory, SimpleNotebookEditorModel } from '@codingame/monaco-vscode-897bebad-39df-57cb-8a57-36a271d038be-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel';
7
7
  import { ReferenceCollection, DisposableStore, dispose, combinedDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
8
8
  import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
9
9
  import { Emitter, AsyncEmitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
@@ -47,6 +47,14 @@ let NotebookModelReferenceCollection = class NotebookModelReferenceCollection ex
47
47
  isDirty(resource) {
48
48
  return this._dirtyStates.get(resource) ?? false;
49
49
  }
50
+ isListeningToModel(uri) {
51
+ for (const key of ( this._modelListener.keys())) {
52
+ if (( key.resource.toString()) === ( uri.toString())) {
53
+ return true;
54
+ }
55
+ }
56
+ return false;
57
+ }
50
58
  async createReferencedObject(key, notebookType, hasAssociatedFilePath, limits, isScratchpad, viewType) {
51
59
  this.modelsToDispose.delete(key);
52
60
  const uri = ( URI.parse(key));
@@ -142,7 +150,7 @@ let NotebookModelResolverServiceImpl = class NotebookModelResolverServiceImpl {
142
150
  const candidate = ( URI.from(
143
151
  { scheme: Schemas.untitled, path: `Untitled-${counter}${suffix}`, query: notebookType }
144
152
  ));
145
- if (!this._notebookService.getNotebookTextModel(candidate)) {
153
+ if (!this._notebookService.getNotebookTextModel(candidate) && !this._data.isListeningToModel(candidate)) {
146
154
  return candidate;
147
155
  }
148
156
  }
@@ -0,0 +1,15 @@
1
+ import { CellKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
2
+ type ICell = {
3
+ internalMetadata?: {
4
+ internalId?: string;
5
+ };
6
+ getValue(): string;
7
+ getLinesContent(): string[];
8
+ cellKind: CellKind;
9
+ };
10
+ export declare function matchCellBasedOnSimilarties(modifiedCells: ICell[], originalCells: ICell[]): {
11
+ modified: number;
12
+ original: number;
13
+ percentage: number;
14
+ }[];
15
+ export {};