@codingame/monaco-vscode-notebook-service-override 22.1.8 → 23.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 (99) hide show
  1. package/index.js +2 -1
  2. package/package.json +25 -23
  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 +24 -24
  5. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +1 -1
  6. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +8 -6
  7. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +1 -1
  8. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +2 -2
  9. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +1 -1
  10. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +1 -1
  11. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +4 -4
  12. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +1 -1
  13. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +7 -7
  14. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +1 -1
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +1 -1
  16. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +1 -1
  17. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +1 -1
  18. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +11 -11
  19. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +1 -1
  20. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +104 -13
  21. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +5 -5
  22. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +2 -2
  23. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +1 -1
  24. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +1 -1
  25. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +1 -1
  26. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +7 -7
  27. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +21 -29
  28. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.d.ts +1 -1
  29. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +1 -1
  30. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +2 -2
  31. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +9 -10
  32. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +3 -3
  33. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +2 -2
  34. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +2 -2
  35. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +11 -11
  36. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
  37. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +1 -1
  38. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +14 -14
  39. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +1 -1
  40. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +4 -4
  41. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +1 -1
  42. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +2 -2
  43. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +17 -387
  44. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.d.ts +1 -1
  45. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +16 -14
  46. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.d.ts +2 -0
  47. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext.js +7 -0
  48. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +28 -28
  49. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +26 -39
  50. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +26 -27
  51. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +18 -19
  52. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.d.ts +5 -5
  53. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +8 -8
  54. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +1 -1
  55. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +14 -14
  56. package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +1 -1
  57. package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +21 -21
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +70 -70
  59. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +10 -10
  60. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +1 -1
  61. package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
  62. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.d.ts +1 -1
  63. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditor.js +6 -6
  64. package/vscode/src/vs/workbench/contrib/notebook/browser/outputEditor/notebookOutputEditorInput.js +1 -1
  65. package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.d.ts +15 -0
  66. package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +49 -0
  67. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +3 -1
  68. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +11 -1
  69. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +1 -1
  70. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
  71. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +3 -3
  72. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.d.ts +1 -0
  73. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +4 -1
  74. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +3 -3
  75. package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +3 -3
  76. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.d.ts +1 -1
  77. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.d.ts +2 -2
  78. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSource.js +1 -1
  79. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.d.ts +1 -1
  80. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +1 -1
  81. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +1 -1
  82. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +3 -2
  83. package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +28 -31
  84. package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +1 -1
  85. package/vscode/src/vs/workbench/contrib/notebook/common/notebookOutputRenderer.js +1 -1
  86. package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +5 -10
  87. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.d.ts +1 -1
  88. package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookWebWorker.js +2 -1
  89. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.d.ts +15 -0
  90. package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +405 -0
  91. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.d.ts +17 -0
  92. package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +120 -0
  93. package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +1 -1
  94. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +2 -2
  95. package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +15 -15
  96. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +1 -1
  97. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +3 -3
  98. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +2 -2
  99. package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +2 -2
@@ -10,6 +10,7 @@ import { IUndoRedoService } from "@codingame/monaco-vscode-api/vscode/vs/platfor
10
10
  import { ILanguageDetectionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.service";
11
11
  import { ICellDto2, ICellEditOperation, INotebookSnapshotOptions, INotebookTextModel, ISelectionState, NotebookCellDefaultCollapseConfig, NotebookData, NotebookDocumentMetadata, NotebookTextModelChangedEvent, NotebookTextModelWillAddRemoveEvent, TransientOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
12
12
  import { INotebookExecutionStateService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service";
13
+ import { INotebookLoggingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service";
13
14
  import { NotebookCellTextModel } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
14
15
  export declare class NotebookTextModel extends Disposable implements INotebookTextModel {
15
16
  readonly viewType: string;
@@ -19,6 +20,7 @@ export declare class NotebookTextModel extends Disposable implements INotebookTe
19
20
  private readonly _languageService;
20
21
  private readonly _languageDetectionService;
21
22
  private readonly _notebookExecutionStateService;
23
+ private readonly _notebookLoggingService;
22
24
  private _isDisposed;
23
25
  private readonly _onWillDispose;
24
26
  private readonly _onWillAddRemoveCells;
@@ -48,7 +50,7 @@ export declare class NotebookTextModel extends Disposable implements INotebookTe
48
50
  get versionId(): number;
49
51
  get alternativeVersionId(): string;
50
52
  get notebookType(): string;
51
- constructor(viewType: string, uri: URI, cells: ICellDto2[], metadata: NotebookDocumentMetadata, options: TransientOptions, _undoService: IUndoRedoService, _modelService: IModelService, _languageService: ILanguageService, _languageDetectionService: ILanguageDetectionService, _notebookExecutionStateService: INotebookExecutionStateService);
53
+ constructor(viewType: string, uri: URI, cells: ICellDto2[], metadata: NotebookDocumentMetadata, options: TransientOptions, _undoService: IUndoRedoService, _modelService: IModelService, _languageService: ILanguageService, _languageDetectionService: ILanguageDetectionService, _notebookExecutionStateService: INotebookExecutionStateService, _notebookLoggingService: INotebookLoggingService);
52
54
  setCellCollapseDefault(collapseConfig: NotebookCellDefaultCollapseConfig | undefined): void;
53
55
  _initialize(cells: ICellDto2[], triggerDirty?: boolean): void;
54
56
  private _bindCellContentHandler;
@@ -70,7 +72,6 @@ export declare class NotebookTextModel extends Disposable implements INotebookTe
70
72
  applyEdits(rawEdits: ICellEditOperation[], synchronous: boolean, beginSelectionState: ISelectionState | undefined, endSelectionsComputer: () => ISelectionState | undefined, undoRedoGroup: UndoRedoGroup | undefined, computeUndoRedo: boolean): boolean;
71
73
  private _doApplyEdits;
72
74
  private _mergeCellEdits;
73
- private _getDefaultCollapseState;
74
75
  private _replaceCells;
75
76
  private _increaseVersionId;
76
77
  private _overwriteAlternativeVersionId;
@@ -17,9 +17,10 @@ import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/com
17
17
  import { UndoRedoElementType } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo';
18
18
  import { IUndoRedoService } from '@codingame/monaco-vscode-api/vscode/vs/platform/undoRedo/common/undoRedo.service';
19
19
  import { ILanguageDetectionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/languageDetection/common/languageDetectionWorkerService.service';
20
- import { SnapshotContext } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
21
- import { CellUri, NotebookCellsChangeType, NotebookCellExecutionState, CellEditType, CellKind, diff } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
20
+ import { SnapshotContext } from '@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
21
+ import { CellUri, NotebookCellsChangeType, NotebookCellExecutionState, CellEditType, diff } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
22
22
  import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
23
+ import { INotebookLoggingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookLoggingService.service';
23
24
  import { SpliceCellsEdit, CellMetadataEdit, MoveCellEdit } from './cellEdit.js';
24
25
  import { NotebookCellOutputTextModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellOutputTextModel';
25
26
  import { NotebookCellTextModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
@@ -178,7 +179,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
178
179
  get notebookType() {
179
180
  return this.viewType;
180
181
  }
181
- constructor(viewType, uri, cells, metadata, options, _undoService, _modelService, _languageService, _languageDetectionService, _notebookExecutionStateService) {
182
+ constructor(viewType, uri, cells, metadata, options, _undoService, _modelService, _languageService, _languageDetectionService, _notebookExecutionStateService, _notebookLoggingService) {
182
183
  super();
183
184
  this.viewType = viewType;
184
185
  this.uri = uri;
@@ -187,6 +188,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
187
188
  this._languageService = _languageService;
188
189
  this._languageDetectionService = _languageDetectionService;
189
190
  this._notebookExecutionStateService = _notebookExecutionStateService;
191
+ this._notebookLoggingService = _notebookLoggingService;
190
192
  this._isDisposed = false;
191
193
  this._onWillDispose = this._register(( new Emitter()));
192
194
  this._onWillAddRemoveCells = this._register(( new Emitter()));
@@ -221,7 +223,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
221
223
  }
222
224
  };
223
225
  this._register(_modelService.onModelAdded(e => maybeUpdateCellTextModel(e)));
224
- this._pauseableEmitter = ( new NotebookEventEmitter({
226
+ this._pauseableEmitter = this._register(( new NotebookEventEmitter({
225
227
  merge: (events) => {
226
228
  const first = events[0];
227
229
  const rawEvents = first.rawEvents;
@@ -236,7 +238,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
236
238
  }
237
239
  return { rawEvents, versionId, endSelectionState, synchronous };
238
240
  }
239
- }));
241
+ })));
240
242
  this._register(this._pauseableEmitter.event(e => {
241
243
  if (e.rawEvents.length) {
242
244
  this._onDidChangeContent.fire(e);
@@ -251,6 +253,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
251
253
  this._overwriteAlternativeVersionId(alternativeVersionId);
252
254
  }
253
255
  ));
256
+ this._notebookLoggingService.trace('notebookTextModel', `Initialized notebook text model for ${( uri.toString())}`);
254
257
  }
255
258
  setCellCollapseDefault(collapseConfig) {
256
259
  this._defaultCollapseConfig = collapseConfig;
@@ -262,22 +265,16 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
262
265
  const mainCells = ( cells.map(cell => {
263
266
  const cellHandle = this._cellhandlePool++;
264
267
  const cellUri = CellUri.generate(this.uri, cellHandle);
265
- const collapseState = this._getDefaultCollapseState(cell);
266
268
  return ( new NotebookCellTextModel(
267
269
  cellUri,
268
270
  cellHandle,
269
- cell.source,
270
- cell.language,
271
- cell.mime,
272
- cell.cellKind,
273
- cell.outputs,
274
- cell.metadata,
275
- cell.internalMetadata,
276
- collapseState,
271
+ cell,
277
272
  this.transientOptions,
278
273
  this._languageService,
279
274
  this._modelService.getCreationOptions(cell.language, cellUri, false).defaultEOL,
280
- this._languageDetectionService
275
+ this._defaultCollapseConfig,
276
+ this._languageDetectionService,
277
+ this._notebookLoggingService
281
278
  ));
282
279
  }));
283
280
  for (let i = 0; i < mainCells.length; i++) {
@@ -514,6 +511,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
514
511
  return true;
515
512
  }
516
513
  applyEdits(rawEdits, synchronous, beginSelectionState, endSelectionsComputer, undoRedoGroup, computeUndoRedo) {
514
+ this._notebookLoggingService.trace('textModelEdits', `Begin applying ${rawEdits.length} raw edits`);
517
515
  this._pauseableEmitter.pause();
518
516
  try {
519
517
  this._operationManager.pushStackElement(this._alternativeVersionId, undefined);
@@ -529,12 +527,17 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
529
527
  this._doApplyEdits(rawEdits, synchronous, computeUndoRedo, beginSelectionState, undoRedoGroup);
530
528
  return true;
531
529
  }
530
+ catch (err) {
531
+ this._notebookLoggingService.error('textModelEdits', `Error while applying edits: ${err}`);
532
+ throw err;
533
+ }
532
534
  finally {
533
535
  if (!this._pauseableEmitter.isEmpty) {
534
536
  const endSelections = endSelectionsComputer();
535
537
  this._increaseVersionId(this._operationManager.isUndoStackEmpty() && !this._pauseableEmitter.isDirtyEvent());
536
538
  this._operationManager.pushStackElement(this._alternativeVersionId, endSelections);
537
539
  this._pauseableEmitter.fire({ rawEvents: [], versionId: this.versionId, synchronous: synchronous, endSelectionState: endSelections });
540
+ this._notebookLoggingService.trace('textModelEdits', `End applying ${rawEdits.length} raw edits`);
538
541
  }
539
542
  }
540
543
  }
@@ -562,7 +565,7 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
562
565
  }
563
566
  }
564
567
  else if (edit.editType !== CellEditType.DocumentMetadata) {
565
- throw ( new Error('Invalid cell edit'));
568
+ throw ( new Error('Invalid cell edit: ' + JSON.stringify(edit)));
566
569
  }
567
570
  return {
568
571
  edit,
@@ -695,10 +698,6 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
695
698
  });
696
699
  return mergedEdits;
697
700
  }
698
- _getDefaultCollapseState(cellDto) {
699
- const defaultConfig = cellDto.cellKind === CellKind.Code ? this._defaultCollapseConfig?.codeCell : this._defaultCollapseConfig?.markupCell;
700
- return cellDto.collapseState ?? (defaultConfig ?? undefined);
701
- }
702
701
  _replaceCells(index, count, cellDtos, synchronous, computeUndoRedo, beginSelectionState, undoRedoGroup) {
703
702
  if (count === 0 && cellDtos.length === 0) {
704
703
  return;
@@ -716,22 +715,19 @@ let NotebookTextModel = NotebookTextModel_1 = class NotebookTextModel extends Di
716
715
  const cells = ( cellDtos.map(cellDto => {
717
716
  const cellHandle = this._cellhandlePool++;
718
717
  const cellUri = CellUri.generate(this.uri, cellHandle);
719
- const collapseState = this._getDefaultCollapseState(cellDto);
718
+ if (!cellDto.outputs) {
719
+ cellDto.outputs = [];
720
+ }
720
721
  const cell = ( new NotebookCellTextModel(
721
722
  cellUri,
722
723
  cellHandle,
723
- cellDto.source,
724
- cellDto.language,
725
- cellDto.mime,
726
- cellDto.cellKind,
727
- cellDto.outputs || [],
728
- cellDto.metadata,
729
- cellDto.internalMetadata,
730
- collapseState,
724
+ cellDto,
731
725
  this.transientOptions,
732
726
  this._languageService,
733
727
  this._modelService.getCreationOptions(cellDto.language, cellUri, false).defaultEOL,
734
- this._languageDetectionService
728
+ this._defaultCollapseConfig,
729
+ this._languageDetectionService,
730
+ this._notebookLoggingService
735
731
  ));
736
732
  const textModel = this._modelService.getModel(cellUri);
737
733
  if (textModel && textModel instanceof TextModel) {
@@ -1165,7 +1161,8 @@ NotebookTextModel = NotebookTextModel_1 = ( __decorate([
1165
1161
  ( __param(6, IModelService)),
1166
1162
  ( __param(7, ILanguageService)),
1167
1163
  ( __param(8, ILanguageDetectionService)),
1168
- ( __param(9, INotebookExecutionStateService))
1164
+ ( __param(9, INotebookExecutionStateService)),
1165
+ ( __param(10, INotebookLoggingService))
1169
1166
  ], NotebookTextModel));
1170
1167
  class OutputSequence {
1171
1168
  constructor(outputs) {
@@ -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-6f931a91-88ea-5232-897f-a17ec3929ba5-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';
@@ -33,7 +33,7 @@ class NotebookOutputRendererInfo {
33
33
  }
34
34
  this.displayName = descriptor.displayName;
35
35
  this.mimeTypes = descriptor.mimeTypes;
36
- this.mimeTypeGlobs = ( this.mimeTypes.map(pattern => parse(pattern)));
36
+ this.mimeTypeGlobs = ( this.mimeTypes.map(pattern => parse(pattern, { ignoreCase: true })));
37
37
  this.hardDependencies = ( new DependencyList(descriptor.dependencies ?? Iterable.empty()));
38
38
  this.optionalDependencies = ( new DependencyList(descriptor.optionalDependencies ?? Iterable.empty()));
39
39
  this.messaging = descriptor.requiresMessaging ?? RendererMessagingSpec.Never;
@@ -1,5 +1,5 @@
1
1
 
2
- import { match, isRelativePattern } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
2
+ import { isRelativePattern, match } from '@codingame/monaco-vscode-api/vscode/vs/base/common/glob';
3
3
  import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
4
4
  import { isDocumentExcludePattern } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
5
5
 
@@ -41,13 +41,8 @@ class NotebookProviderInfo {
41
41
  return this.selectors?.some(selector => NotebookProviderInfo.selectorMatches(selector, resource));
42
42
  }
43
43
  static selectorMatches(selector, resource) {
44
- if (typeof selector === 'string') {
45
- if (match(selector.toLowerCase(), basename(resource.fsPath).toLowerCase())) {
46
- return true;
47
- }
48
- }
49
- if (isRelativePattern(selector)) {
50
- if (match(selector, basename(resource.fsPath).toLowerCase())) {
44
+ if (typeof selector === 'string' || isRelativePattern(selector)) {
45
+ if (match(selector, basename(resource.fsPath), { ignoreCase: true })) {
51
46
  return true;
52
47
  }
53
48
  }
@@ -56,9 +51,9 @@ class NotebookProviderInfo {
56
51
  }
57
52
  const filenamePattern = selector.include;
58
53
  const excludeFilenamePattern = selector.exclude;
59
- if (match(filenamePattern, basename(resource.fsPath).toLowerCase())) {
54
+ if (match(filenamePattern, basename(resource.fsPath), { ignoreCase: true })) {
60
55
  if (excludeFilenamePattern) {
61
- if (match(excludeFilenamePattern, basename(resource.fsPath).toLowerCase())) {
56
+ if (match(excludeFilenamePattern, basename(resource.fsPath), { ignoreCase: true })) {
62
57
  return false;
63
58
  }
64
59
  }
@@ -33,7 +33,7 @@ declare class MirrorNotebookDocument {
33
33
  _spliceNotebookCells(splices: NotebookCellTextModelSplice<IMainCellDto>[]): void;
34
34
  }
35
35
  export declare class NotebookWorker implements IWebWorkerServerRequestHandler, IDisposable {
36
- _requestHandlerBrand: any;
36
+ _requestHandlerBrand: void;
37
37
  private _models;
38
38
  constructor();
39
39
  dispose(): void;
@@ -141,6 +141,7 @@ class CellSequence {
141
141
  }
142
142
  class NotebookWorker {
143
143
  constructor() {
144
+ this._requestHandlerBrand = undefined;
144
145
  this._models = Object.create(null);
145
146
  }
146
147
  dispose() {
@@ -178,7 +179,7 @@ class NotebookWorker {
178
179
  };
179
180
  }
180
181
  const cellMapping = computeDiff(originalModel, modifiedModel, { cellsDiff: { changes: originalDiff.changes, quitEarly: false }}).cellDiffInfo;
181
- if (cellMapping.every(c => c.type === 'modified')) {
182
+ if (cellMapping.every(c => c.type === 'modified' || c.type === 'unchanged')) {
182
183
  return {
183
184
  metadataChanged,
184
185
  cellsDiff: originalDiff
@@ -0,0 +1,15 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
3
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
4
+ import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
5
+ import { IEditorResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service";
6
+ import { INotebookEditorModelResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service";
7
+ import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
8
+ export declare class ReplDocumentContribution extends Disposable implements IWorkbenchContribution {
9
+ private readonly notebookEditorModelResolverService;
10
+ private readonly instantiationService;
11
+ private readonly configurationService;
12
+ static readonly ID = "workbench.contrib.replDocument";
13
+ private readonly editorInputCache;
14
+ constructor(notebookService: INotebookService, editorResolverService: IEditorResolverService, notebookEditorModelResolverService: INotebookEditorModelResolverService, instantiationService: IInstantiationService, configurationService: IConfigurationService);
15
+ }