@codingame/monaco-vscode-notebook-service-override 14.0.6 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +26 -29
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js +8 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands.js +29 -28
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticEditorContrib.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +9 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +5 -9
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/contribution.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/contribution.js +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookCellDecorators.d.ts +4 -40
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookCellDecorators.js +13 -217
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatActionsOverlay.d.ts +3 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatActionsOverlay.js +22 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditController.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookChatEditController.js +17 -20
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalCellModelFactory.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalCellModelFactory.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalModelRefFactory.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalModelRefFactory.js +8 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.js +47 -29
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.d.ts +5 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizerService.js +28 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js +10 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js +13 -13
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/execute/executionEditorProgress.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/format/formatting.js +12 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider.js +4 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +14 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookSelectionHighlight.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +18 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.d.ts +11 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookInlineVariables.js +328 -116
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariables.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesDataSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesTree.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.d.ts +1 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariablesView.js +8 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline.js +16 -16
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/saveParticipants/saveParticipants.js +19 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/undoRedo/notebookUndoRedo.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/viewportWarmup/viewportWarmup.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.d.ts +3 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +39 -37
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebook.chat.contribution.js +99 -8
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +40 -35
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/executeActions.js +31 -31
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +37 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/layoutActions.js +22 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/notebookIndentationActions.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.js +17 -17
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/variablesActions.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffActions.js +58 -25
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +99 -87
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityHelp.js +12 -12
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibleView.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookExtensionPoint.js +33 -33
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.d.ts +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookEditorServiceImpl.js +7 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKernelHistoryServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookLoggingServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookServiceImpl.js +8 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/services/notebookWorkerServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.d.ts +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +2 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/cellEdit.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.d.ts +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookTextModel.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookProvider.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/services/notebookSimpleWorker.js +20 -16
- package/vscode/src/vs/workbench/services/workingCopy/common/abstractFileWorkingCopyManager.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.d.ts +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +14 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.d.ts +1 -1
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +3 -3
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.d.ts +2 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/untitledFileWorkingCopy.js +2 -2
|
@@ -4,11 +4,13 @@ import { ReferenceCollection, AsyncReferenceCollection } from '@codingame/monaco
|
|
|
4
4
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
5
5
|
import { VSBuffer, bufferToStream } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
6
6
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
7
8
|
|
|
8
9
|
let OriginalNotebookModelReferenceCollection = class OriginalNotebookModelReferenceCollection extends ReferenceCollection {
|
|
9
|
-
constructor(notebookService) {
|
|
10
|
+
constructor(notebookService, modelService) {
|
|
10
11
|
super();
|
|
11
12
|
this.notebookService = notebookService;
|
|
13
|
+
this.modelService = modelService;
|
|
12
14
|
this.modelsToDispose = ( new Set());
|
|
13
15
|
}
|
|
14
16
|
async createReferencedObject(key, fileEntry, viewType) {
|
|
@@ -18,8 +20,10 @@ let OriginalNotebookModelReferenceCollection = class OriginalNotebookModelRefere
|
|
|
18
20
|
if (model) {
|
|
19
21
|
return model;
|
|
20
22
|
}
|
|
21
|
-
const
|
|
23
|
+
const modelRef = await this.modelService.createModelReference(uri);
|
|
24
|
+
const bytes = VSBuffer.fromString(modelRef.object.textEditorModel.getValue());
|
|
22
25
|
const stream = bufferToStream(bytes);
|
|
26
|
+
modelRef.dispose();
|
|
23
27
|
return this.notebookService.createNotebookTextModel(viewType, uri, stream);
|
|
24
28
|
}
|
|
25
29
|
destroyReferencedObject(key, modelPromise) {
|
|
@@ -41,7 +45,8 @@ let OriginalNotebookModelReferenceCollection = class OriginalNotebookModelRefere
|
|
|
41
45
|
}
|
|
42
46
|
};
|
|
43
47
|
OriginalNotebookModelReferenceCollection = ( __decorate([
|
|
44
|
-
( __param(0, INotebookService))
|
|
48
|
+
( __param(0, INotebookService)),
|
|
49
|
+
( __param(1, ITextModelService))
|
|
45
50
|
], OriginalNotebookModelReferenceCollection));
|
|
46
51
|
let NotebookOriginalModelReferenceFactory = class NotebookOriginalModelReferenceFactory {
|
|
47
52
|
get resourceModelCollection() {
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Disposable, IReference } from "@codingame/monaco-vscode-api/vscode/vs/b
|
|
|
2
2
|
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
3
3
|
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
4
4
|
import { NotebookTextModel } from "../../../common/model/notebookTextModel.js";
|
|
5
|
-
import { CellDiffInfo } from "@codingame/monaco-vscode-
|
|
5
|
+
import { CellDiffInfo } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel";
|
|
6
6
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
7
7
|
import { INotebookEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service";
|
|
8
8
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
@@ -12,8 +12,9 @@ import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/c
|
|
|
12
12
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
13
13
|
import { INotebookOriginalModelReferenceFactory } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalModelRefFactory.service";
|
|
14
14
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
15
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService";
|
|
15
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
16
16
|
import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service";
|
|
17
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
17
18
|
import { INotebookModelSynchronizerFactory } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.service";
|
|
18
19
|
export declare class NotebookModelSynchronizerFactory implements INotebookModelSynchronizerFactory {
|
|
19
20
|
readonly _serviceBrand: undefined;
|
|
@@ -25,6 +26,7 @@ export declare class NotebookModelSynchronizer extends Disposable {
|
|
|
25
26
|
private readonly model;
|
|
26
27
|
private readonly notebookService;
|
|
27
28
|
private readonly notebookEditorService;
|
|
29
|
+
private readonly modelService;
|
|
28
30
|
private readonly textModelService;
|
|
29
31
|
private readonly logService;
|
|
30
32
|
private readonly configurationService;
|
|
@@ -42,14 +44,14 @@ export declare class NotebookModelSynchronizer extends Disposable {
|
|
|
42
44
|
private isTextEditFromUs;
|
|
43
45
|
private isReverting;
|
|
44
46
|
private throttledTextModelUpdate;
|
|
45
|
-
constructor(model: NotebookTextModel, _chatEditingService: IChatEditingService, notebookService: INotebookService, notebookEditorService: INotebookEditorService, chatService: IChatService, textModelService: ITextModelService, logService: INotebookLoggingService, configurationService: IConfigurationService, notebookEditorWorkerService: INotebookEditorWorkerService, notebookModelResolverService: INotebookEditorModelResolverService, originalModelRefFactory: INotebookOriginalModelReferenceFactory);
|
|
47
|
+
constructor(model: NotebookTextModel, _chatEditingService: IChatEditingService, notebookService: INotebookService, notebookEditorService: INotebookEditorService, chatService: IChatService, modelService: IModelService, textModelService: ITextModelService, logService: INotebookLoggingService, configurationService: IConfigurationService, notebookEditorWorkerService: INotebookEditorWorkerService, notebookModelResolverService: INotebookEditorModelResolverService, originalModelRefFactory: INotebookOriginalModelReferenceFactory);
|
|
46
48
|
private createSnapshot;
|
|
47
49
|
revert(): Promise<void>;
|
|
48
50
|
private revertImpl;
|
|
49
51
|
private updateNotebook;
|
|
50
52
|
private accept;
|
|
51
53
|
private updateTextDocumentModel;
|
|
52
|
-
getNotebookSerializer(): Promise<import("@codingame/monaco-vscode-
|
|
54
|
+
getNotebookSerializer(): Promise<import("@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/notebook/common/notebookService").INotebookSerializer>;
|
|
53
55
|
private _originalModel?;
|
|
54
56
|
private getOriginalModel;
|
|
55
57
|
private updateNotebookModel;
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookSynchronizer.js
CHANGED
|
@@ -6,7 +6,7 @@ import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/work
|
|
|
6
6
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
7
7
|
import { VSBuffer, streamToBuffer, bufferToStream } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
8
8
|
import { ThrottledDelayer, raceCancellation } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
9
|
-
import { prettyChanges, computeDiff } from '@codingame/monaco-vscode-
|
|
9
|
+
import { prettyChanges, computeDiff } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel';
|
|
10
10
|
import { CancellationTokenSource, CancellationToken } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
11
11
|
import { INotebookEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/services/notebookWorkerService.service';
|
|
12
12
|
import { NotebookSetting, CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
@@ -18,17 +18,17 @@ import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-ap
|
|
|
18
18
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
19
19
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
20
20
|
import { INotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/contrib/chatEdit/notebookOriginalModelRefFactory.service';
|
|
21
|
-
import
|
|
22
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
|
|
23
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
24
|
-
import { autorunWithStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
25
|
-
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/derived';
|
|
26
|
-
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/utils';
|
|
21
|
+
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
27
22
|
import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
28
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService';
|
|
29
|
-
import { SnapshotContext } from '@codingame/monaco-vscode-
|
|
23
|
+
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
24
|
+
import { SnapshotContext } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/fileWorkingCopy';
|
|
30
25
|
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
31
|
-
import { CellEditState } from '@codingame/monaco-vscode-
|
|
26
|
+
import { CellEditState } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
27
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
28
|
+
import { ChatEditingModifiedDocumentEntry } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry';
|
|
29
|
+
import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/base';
|
|
30
|
+
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/derived';
|
|
31
|
+
import { autorunWithStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/autorun';
|
|
32
32
|
|
|
33
33
|
let NotebookModelSynchronizerReferenceCollection = class NotebookModelSynchronizerReferenceCollection extends ReferenceCollection {
|
|
34
34
|
constructor(instantiationService) {
|
|
@@ -60,11 +60,12 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
60
60
|
get diffInfo() {
|
|
61
61
|
return this._diffInfo;
|
|
62
62
|
}
|
|
63
|
-
constructor(model, _chatEditingService, notebookService, notebookEditorService, chatService, textModelService, logService, configurationService, notebookEditorWorkerService, notebookModelResolverService, originalModelRefFactory) {
|
|
63
|
+
constructor(model, _chatEditingService, notebookService, notebookEditorService, chatService, modelService, textModelService, logService, configurationService, notebookEditorWorkerService, notebookModelResolverService, originalModelRefFactory) {
|
|
64
64
|
super();
|
|
65
65
|
this.model = model;
|
|
66
66
|
this.notebookService = notebookService;
|
|
67
67
|
this.notebookEditorService = notebookEditorService;
|
|
68
|
+
this.modelService = modelService;
|
|
68
69
|
this.textModelService = textModelService;
|
|
69
70
|
this.logService = logService;
|
|
70
71
|
this.configurationService = configurationService;
|
|
@@ -78,11 +79,9 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
78
79
|
this.isReverting = false;
|
|
79
80
|
this.throttledTextModelUpdate = ( new ThrottledDelayer(100));
|
|
80
81
|
const entryObs = derived((r) => {
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
return session.readEntry(model.uri, r);
|
|
82
|
+
const sessions = _chatEditingService.editingSessionsObs.read(r);
|
|
83
|
+
const entry = ( sessions.map(s => s.readEntry(model.uri, r))).find(r => !!r);
|
|
84
|
+
return entry instanceof ChatEditingModifiedDocumentEntry ? entry : undefined;
|
|
86
85
|
}).recomputeInitiallyAndOnChange(this._store);
|
|
87
86
|
this._register(chatService.onDidPerformUserAction(async (e) => {
|
|
88
87
|
const entry = entryObs.read(undefined);
|
|
@@ -113,10 +112,14 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
113
112
|
this.createSnapshot();
|
|
114
113
|
snapshotCreated = true;
|
|
115
114
|
}
|
|
116
|
-
const modifiedModel = entry.
|
|
115
|
+
const modifiedModel = this.modelService.getModel(entry.modifiedURI);
|
|
116
|
+
if (!modifiedModel) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
117
119
|
let cancellationToken = store.add(( new CancellationTokenSource()));
|
|
118
120
|
store.add(modifiedModel.onDidChangeContent(async () => {
|
|
119
|
-
|
|
121
|
+
const originalModel = this.modelService.getModel(entry.originalURI);
|
|
122
|
+
if (originalModel && !this.isTextEditFromUs && !modifiedModel.isDisposed() && !originalModel.isDisposed() && modifiedModel.getValue() !== originalModel.getValue()) {
|
|
120
123
|
cancellationToken = store.add(( new CancellationTokenSource()));
|
|
121
124
|
updateNotebookModel(entry, cancellationToken.token);
|
|
122
125
|
}
|
|
@@ -213,7 +216,10 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
213
216
|
}
|
|
214
217
|
}
|
|
215
218
|
async accept(entry) {
|
|
216
|
-
const modifiedModel = entry.
|
|
219
|
+
const modifiedModel = this.modelService.getModel(entry.modifiedURI);
|
|
220
|
+
if (!modifiedModel) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
217
223
|
const content = modifiedModel.getValue();
|
|
218
224
|
await this.updateNotebook(VSBuffer.fromString(content), false);
|
|
219
225
|
this._diffInfo.set(undefined, undefined);
|
|
@@ -222,7 +228,10 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
222
228
|
await this.notebookService.restoreNotebookTextModelFromSnapshot(originalModel.uri, originalModel.viewType, stream);
|
|
223
229
|
}
|
|
224
230
|
async updateTextDocumentModel(entry) {
|
|
225
|
-
const modifiedModel = entry.
|
|
231
|
+
const modifiedModel = this.modelService.getModel(entry.modifiedURI);
|
|
232
|
+
if (!modifiedModel) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
226
235
|
const stream = await this.notebookService.createNotebookTextDocumentSnapshot(this.model.uri, SnapshotContext.Save, CancellationToken.None);
|
|
227
236
|
const buffer = await streamToBuffer(stream);
|
|
228
237
|
const text = ( new TextDecoder()).decode(buffer.buffer);
|
|
@@ -249,7 +258,11 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
249
258
|
return this._originalModel;
|
|
250
259
|
}
|
|
251
260
|
async updateNotebookModel(entry, token) {
|
|
252
|
-
const
|
|
261
|
+
const modifiedModel = this.modelService.getModel(entry.modifiedURI);
|
|
262
|
+
if (!modifiedModel) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const modifiedModelVersion = modifiedModel.getVersionId();
|
|
253
266
|
const currentModel = this.model;
|
|
254
267
|
const modelVersion = currentModel?.versionId ?? 0;
|
|
255
268
|
const modelWithChatEdits = await this.getModifiedModelForDiff(entry, token);
|
|
@@ -259,7 +272,7 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
259
272
|
const originalModel = await this.getOriginalModel(entry);
|
|
260
273
|
const cellDiffInfo = (await this.computeDiff(originalModel, modelWithChatEdits, token))?.cellDiffInfo;
|
|
261
274
|
const cellDiffInfoToApplyEdits = (await this.computeDiff(currentModel, modelWithChatEdits, token))?.cellDiffInfo;
|
|
262
|
-
const currentVersion =
|
|
275
|
+
const currentVersion = modifiedModel.getVersionId();
|
|
263
276
|
if (!cellDiffInfo || !cellDiffInfoToApplyEdits || token.isCancellationRequested || currentVersion !== modifiedModelVersion || modelVersion !== currentModel.versionId) {
|
|
264
277
|
return;
|
|
265
278
|
}
|
|
@@ -377,7 +390,11 @@ let NotebookModelSynchronizer = class NotebookModelSynchronizer extends Disposab
|
|
|
377
390
|
}
|
|
378
391
|
}
|
|
379
392
|
async getModifiedModelForDiff(entry, token) {
|
|
380
|
-
const
|
|
393
|
+
const modifiedModel = this.modelService.getModel(entry.modifiedURI);
|
|
394
|
+
if (!modifiedModel) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
const text = modifiedModel.getValue();
|
|
381
398
|
const bytes = VSBuffer.fromString(text);
|
|
382
399
|
const uri = entry.modifiedURI.with({ scheme: `NotebookChatEditorController.modifiedScheme${( Date.now().toString())}` });
|
|
383
400
|
const stream = bufferToStream(bytes);
|
|
@@ -414,12 +431,13 @@ NotebookModelSynchronizer = ( __decorate([
|
|
|
414
431
|
( __param(2, INotebookService)),
|
|
415
432
|
( __param(3, INotebookEditorService)),
|
|
416
433
|
( __param(4, IChatService)),
|
|
417
|
-
( __param(5,
|
|
418
|
-
( __param(6,
|
|
419
|
-
( __param(7,
|
|
420
|
-
( __param(8,
|
|
421
|
-
( __param(9,
|
|
422
|
-
( __param(10,
|
|
434
|
+
( __param(5, IModelService)),
|
|
435
|
+
( __param(6, ITextModelService)),
|
|
436
|
+
( __param(7, INotebookLoggingService)),
|
|
437
|
+
( __param(8, IConfigurationService)),
|
|
438
|
+
( __param(9, INotebookEditorWorkerService)),
|
|
439
|
+
( __param(10, INotebookEditorModelResolverService)),
|
|
440
|
+
( __param(11, INotebookOriginalModelReferenceFactory))
|
|
423
441
|
], NotebookModelSynchronizer));
|
|
424
442
|
|
|
425
443
|
export { NotebookModelSynchronizer, NotebookModelSynchronizerFactory };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
2
|
-
import { IStoredFileWorkingCopy } from "@codingame/monaco-vscode-
|
|
2
|
+
import { IStoredFileWorkingCopy } from "@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy";
|
|
3
3
|
import { IUntitledFileWorkingCopy } from "../../../../../services/workingCopy/common/untitledFileWorkingCopy.js";
|
|
4
4
|
import { IWorkingCopyFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
5
5
|
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
6
|
-
import { NotebookFileWorkingCopyModel } from "@codingame/monaco-vscode-
|
|
6
|
+
import { NotebookFileWorkingCopyModel } from "@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorModel";
|
|
7
7
|
import { INotebookSynchronizerService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookSynchronizerService.service";
|
|
8
8
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
9
9
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
10
|
+
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
10
11
|
export declare class NotebookSynchronizerService extends Disposable implements INotebookSynchronizerService {
|
|
11
12
|
private readonly _chatEditingService;
|
|
12
13
|
protected readonly _fileService: IFileService;
|
|
14
|
+
private readonly _notebookService;
|
|
13
15
|
private readonly _instantiationService;
|
|
14
16
|
private readonly _workingCopyFileService;
|
|
15
17
|
_serviceBrand: undefined;
|
|
16
|
-
constructor(_chatEditingService: IChatEditingService, _fileService: IFileService, _instantiationService: IInstantiationService, _workingCopyFileService: IWorkingCopyFileService);
|
|
18
|
+
constructor(_chatEditingService: IChatEditingService, _fileService: IFileService, _notebookService: INotebookService, _instantiationService: IInstantiationService, _workingCopyFileService: IWorkingCopyFileService);
|
|
17
19
|
revert(workingCopy: IStoredFileWorkingCopy<NotebookFileWorkingCopyModel> | IUntitledFileWorkingCopy<NotebookFileWorkingCopyModel>): Promise<void>;
|
|
18
20
|
}
|
|
@@ -1,32 +1,39 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
4
|
-
import { StoredFileWorkingCopy } from '@codingame/monaco-vscode-
|
|
4
|
+
import { StoredFileWorkingCopy } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/services/workingCopy/common/storedFileWorkingCopy';
|
|
5
5
|
import { IWorkingCopyFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
6
|
-
import { ChatEditingModifiedNotebookEntry } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry';
|
|
7
6
|
import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
|
|
8
7
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
8
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
10
9
|
import { NotebookSaveParticipant } from '../saveParticipants/saveParticipants.js';
|
|
11
10
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
|
+
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
12
|
+
import { ChatEditingModifiedDocumentEntry } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry';
|
|
13
|
+
import { SaveReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
12
14
|
|
|
13
15
|
let NotebookSynchronizerSaveParticipant = class NotebookSynchronizerSaveParticipant extends NotebookSaveParticipant {
|
|
14
|
-
constructor(editorService, _chatEditingService, _fileService) {
|
|
16
|
+
constructor(editorService, _chatEditingService, _fileService, _notebookService) {
|
|
15
17
|
super(editorService);
|
|
16
18
|
this._chatEditingService = _chatEditingService;
|
|
17
19
|
this._fileService = _fileService;
|
|
20
|
+
this._notebookService = _notebookService;
|
|
18
21
|
}
|
|
19
22
|
async participate(workingCopy, context, progress, token) {
|
|
20
|
-
const
|
|
23
|
+
const sessions = this._chatEditingService.editingSessionsObs.get();
|
|
24
|
+
const session = sessions.find(s => s.getEntry(workingCopy.resource));
|
|
21
25
|
if (!session) {
|
|
22
26
|
return;
|
|
23
27
|
}
|
|
28
|
+
if (!this._notebookService.hasSupportedNotebooks(workingCopy.resource)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
24
31
|
const entry = session.getEntry(workingCopy.resource);
|
|
25
|
-
if (entry && entry instanceof
|
|
26
|
-
await entry.
|
|
32
|
+
if (entry && entry instanceof ChatEditingModifiedDocumentEntry) {
|
|
33
|
+
await entry.docFileEditorModel.save({ reason: SaveReason.EXPLICIT, ignoreModifiedSince: true });
|
|
27
34
|
}
|
|
28
35
|
const inWorkingSet = ( session.workingSet.has(workingCopy.resource));
|
|
29
|
-
if (!(entry && entry instanceof
|
|
36
|
+
if (!(entry && entry instanceof ChatEditingModifiedDocumentEntry) && !inWorkingSet) {
|
|
30
37
|
return;
|
|
31
38
|
}
|
|
32
39
|
if (workingCopy instanceof StoredFileWorkingCopy) {
|
|
@@ -43,33 +50,37 @@ let NotebookSynchronizerSaveParticipant = class NotebookSynchronizerSaveParticip
|
|
|
43
50
|
NotebookSynchronizerSaveParticipant = ( __decorate([
|
|
44
51
|
( __param(0, IEditorService)),
|
|
45
52
|
( __param(1, IChatEditingService)),
|
|
46
|
-
( __param(2, IFileService))
|
|
53
|
+
( __param(2, IFileService)),
|
|
54
|
+
( __param(3, INotebookService))
|
|
47
55
|
], NotebookSynchronizerSaveParticipant));
|
|
48
56
|
let NotebookSynchronizerService = class NotebookSynchronizerService extends Disposable {
|
|
49
|
-
constructor(_chatEditingService, _fileService, _instantiationService, _workingCopyFileService) {
|
|
57
|
+
constructor(_chatEditingService, _fileService, _notebookService, _instantiationService, _workingCopyFileService) {
|
|
50
58
|
super();
|
|
51
59
|
this._chatEditingService = _chatEditingService;
|
|
52
60
|
this._fileService = _fileService;
|
|
61
|
+
this._notebookService = _notebookService;
|
|
53
62
|
this._instantiationService = _instantiationService;
|
|
54
63
|
this._workingCopyFileService = _workingCopyFileService;
|
|
55
64
|
this._register(this._workingCopyFileService.addSaveParticipant(this._instantiationService.createInstance(NotebookSynchronizerSaveParticipant)));
|
|
56
65
|
}
|
|
57
66
|
async revert(workingCopy) {
|
|
58
67
|
const resource = workingCopy.resource;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
if (!this._notebookService.hasSupportedNotebooks(workingCopy.resource)) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const sessions = this._chatEditingService.editingSessionsObs.get();
|
|
72
|
+
const entry = ( sessions.map(s => s.getEntry(resource))).find(r => !!r);
|
|
73
|
+
if (entry instanceof ChatEditingModifiedDocumentEntry) {
|
|
74
|
+
await entry.docFileEditorModel.revert({ soft: true });
|
|
65
75
|
}
|
|
66
76
|
}
|
|
67
77
|
};
|
|
68
78
|
NotebookSynchronizerService = ( __decorate([
|
|
69
79
|
( __param(0, IChatEditingService)),
|
|
70
80
|
( __param(1, IFileService)),
|
|
71
|
-
( __param(2,
|
|
72
|
-
( __param(3,
|
|
81
|
+
( __param(2, INotebookService)),
|
|
82
|
+
( __param(3, IInstantiationService)),
|
|
83
|
+
( __param(4, IWorkingCopyFileService))
|
|
73
84
|
], NotebookSynchronizerService));
|
|
74
85
|
|
|
75
86
|
export { NotebookSynchronizerService };
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
3
|
-
import { ICellViewModel, INotebookEditor } from "@codingame/monaco-vscode-
|
|
4
|
-
import { NotebookCellTextModel } from "@codingame/monaco-vscode-
|
|
3
|
+
import { ICellViewModel, INotebookEditor } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
4
|
+
import { NotebookCellTextModel } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel";
|
|
5
5
|
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
6
|
export declare function runPasteCells(editor: INotebookEditor, activeCell: ICellViewModel | undefined, pasteCells: {
|
|
7
7
|
items: NotebookCellTextModel[];
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard.js
CHANGED
|
@@ -4,16 +4,16 @@ import { localize, localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls'
|
|
|
4
4
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
6
6
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
7
|
-
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_OUTPUT_FOCUSED } from '@codingame/monaco-vscode-
|
|
8
|
-
import { getNotebookEditorFromEditorPane, expandCellRangesWithHiddenCells, cellRangeToViewCells } from '@codingame/monaco-vscode-
|
|
7
|
+
import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE, NOTEBOOK_OUTPUT_FOCUSED } from '@codingame/monaco-vscode-52bb4d5b-ba1a-57fd-9bee-b28824214eac-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
8
|
+
import { getNotebookEditorFromEditorPane, expandCellRangesWithHiddenCells, cellRangeToViewCells } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
9
9
|
import { CopyAction, PasteAction, CutAction } from '@codingame/monaco-vscode-api/vscode/vs/editor/contrib/clipboard/browser/clipboard';
|
|
10
10
|
import { IClipboardService } from '@codingame/monaco-vscode-api/vscode/vs/platform/clipboard/common/clipboardService.service';
|
|
11
|
-
import { cloneNotebookCellTextModel } from '@codingame/monaco-vscode-
|
|
11
|
+
import { cloneNotebookCellTextModel } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
|
12
12
|
import { SelectionStateType, CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
13
13
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
14
14
|
import { isNative } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
15
15
|
import { registerAction2, MenuId, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
16
|
-
import { NotebookCellAction, CellOverflowToolbarGroups, NotebookAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT } from '@codingame/monaco-vscode-
|
|
16
|
+
import { NotebookCellAction, CellOverflowToolbarGroups, NotebookAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, NOTEBOOK_OUTPUT_WEBVIEW_ACTION_WEIGHT } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
17
17
|
import { KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
18
18
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
19
|
import { InputFocusedContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
|
|
@@ -350,7 +350,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
350
350
|
constructor() {
|
|
351
351
|
super({
|
|
352
352
|
id: COPY_CELL_COMMAND_ID,
|
|
353
|
-
title: ( localize(
|
|
353
|
+
title: ( localize(7576, "Copy Cell")),
|
|
354
354
|
menu: {
|
|
355
355
|
id: MenuId.NotebookCellTitle,
|
|
356
356
|
when: NOTEBOOK_EDITOR_FOCUSED,
|
|
@@ -373,7 +373,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
373
373
|
constructor() {
|
|
374
374
|
super({
|
|
375
375
|
id: CUT_CELL_COMMAND_ID,
|
|
376
|
-
title: ( localize(
|
|
376
|
+
title: ( localize(7577, "Cut Cell")),
|
|
377
377
|
menu: {
|
|
378
378
|
id: MenuId.NotebookCellTitle,
|
|
379
379
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_CELL_EDITABLE)),
|
|
@@ -396,7 +396,7 @@ registerAction2(class extends NotebookAction {
|
|
|
396
396
|
constructor() {
|
|
397
397
|
super({
|
|
398
398
|
id: PASTE_CELL_COMMAND_ID,
|
|
399
|
-
title: ( localize(
|
|
399
|
+
title: ( localize(7578, "Paste Cell")),
|
|
400
400
|
menu: {
|
|
401
401
|
id: MenuId.NotebookCellTitle,
|
|
402
402
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_EDITOR_EDITABLE)),
|
|
@@ -428,7 +428,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
428
428
|
constructor() {
|
|
429
429
|
super({
|
|
430
430
|
id: PASTE_CELL_ABOVE_COMMAND_ID,
|
|
431
|
-
title: ( localize(
|
|
431
|
+
title: ( localize(7579, "Paste Cell Above")),
|
|
432
432
|
keybinding: {
|
|
433
433
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey))),
|
|
434
434
|
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyV,
|
|
@@ -472,7 +472,7 @@ registerAction2(class extends Action2 {
|
|
|
472
472
|
constructor() {
|
|
473
473
|
super({
|
|
474
474
|
id: 'workbench.action.toggleNotebookClipboardLog',
|
|
475
|
-
title: ( localize2(
|
|
475
|
+
title: ( localize2(7580, 'Toggle Notebook Clipboard Troubleshooting')),
|
|
476
476
|
category: Categories.Developer,
|
|
477
477
|
f1: true
|
|
478
478
|
});
|
|
@@ -489,7 +489,7 @@ registerAction2(class extends NotebookCellAction {
|
|
|
489
489
|
constructor() {
|
|
490
490
|
super({
|
|
491
491
|
id: 'notebook.cell.output.selectAll',
|
|
492
|
-
title: ( localize(
|
|
492
|
+
title: ( localize(7581, "Select All")),
|
|
493
493
|
keybinding: {
|
|
494
494
|
primary: KeyMod.CtrlCmd | KeyCode.KeyA,
|
|
495
495
|
when: ( ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED)),
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookBreakpoints.js
CHANGED
|
@@ -7,7 +7,7 @@ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/reso
|
|
|
7
7
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
8
8
|
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
9
9
|
import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
10
|
-
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-
|
|
10
|
+
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
11
11
|
import { NotebookCellsChangeType, CellUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
13
13
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
3
|
import { IDebugService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service";
|
|
4
|
-
import { INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-
|
|
4
|
+
import { INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
5
5
|
import { INotebookExecutionStateService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service";
|
|
6
6
|
export declare class PausedCellDecorationContribution extends Disposable implements INotebookEditorContribution {
|
|
7
7
|
private readonly _notebookEditor;
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/debug/notebookDebugDecorations.js
CHANGED
|
@@ -7,11 +7,11 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
7
7
|
import { debugIconBreakpointForeground } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/browser/breakpointEditorContribution';
|
|
8
8
|
import { topStackFrameColor, focusedStackFrameColor } from '@codingame/monaco-vscode-0b087f42-a5a3-5eb9-9bfd-1eebc1bba163-common/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution';
|
|
9
9
|
import { IDebugService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
10
|
-
import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-
|
|
11
|
-
import { registerNotebookContribution } from '@codingame/monaco-vscode-
|
|
12
|
-
import { runningCellRulerDecorationColor } from '@codingame/monaco-vscode-
|
|
10
|
+
import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
11
|
+
import { registerNotebookContribution } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
12
|
+
import { runningCellRulerDecorationColor } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorWidget';
|
|
13
13
|
import { CellUri, NotebookCellExecutionState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
14
|
-
import { NotebookExecutionType } from '@codingame/monaco-vscode-
|
|
14
|
+
import { NotebookExecutionType } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService';
|
|
15
15
|
import { INotebookExecutionStateService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service';
|
|
16
16
|
|
|
17
17
|
let PausedCellDecorationContribution = class PausedCellDecorationContribution extends Disposable {
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorHint/emptyCellEditorHint.js
CHANGED
|
@@ -12,7 +12,7 @@ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
12
12
|
import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
|
|
13
13
|
import { EmptyTextEditorHintContribution } from '../../../../codeEditor/browser/emptyTextEditorHint/emptyTextEditorHint.js';
|
|
14
14
|
import { IInlineChatSessionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service';
|
|
15
|
-
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-
|
|
15
|
+
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
16
16
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
17
17
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
18
18
|
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.js
CHANGED
|
@@ -3,15 +3,15 @@ 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 { DisposableStore, Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
6
|
-
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures';
|
|
6
|
+
import { ILanguageFeaturesService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/languageFeatures.service';
|
|
7
7
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
8
8
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
9
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
10
10
|
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
11
11
|
import { CENTER_ACTIVE_CELL } from '../navigation/arrow.js';
|
|
12
|
-
import { SELECT_KERNEL_ID } from '@codingame/monaco-vscode-
|
|
12
|
+
import { SELECT_KERNEL_ID } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
13
13
|
import { SELECT_NOTEBOOK_INDENTATION_ID } from '../../controller/editActions.js';
|
|
14
|
-
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-
|
|
14
|
+
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
15
15
|
import { NotebookCellsChangeType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
16
16
|
import { INotebookKernelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookKernelService.service';
|
|
17
17
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
@@ -112,19 +112,19 @@ let KernelStatus = class KernelStatus extends Disposable {
|
|
|
112
112
|
}
|
|
113
113
|
const tooltip = kernel.description ?? kernel.detail ?? kernel.label;
|
|
114
114
|
this._kernelInfoElement.add(this._statusbarService.addEntry({
|
|
115
|
-
name: ( localize(
|
|
115
|
+
name: ( localize(7582, "Notebook Kernel Info")),
|
|
116
116
|
text: `$(notebook-kernel-select) ${kernel.label}`,
|
|
117
117
|
ariaLabel: kernel.label,
|
|
118
|
-
tooltip: isSuggested ? ( localize(
|
|
118
|
+
tooltip: isSuggested ? ( localize(7583, "{0} (suggestion)", tooltip)) : tooltip,
|
|
119
119
|
command: SELECT_KERNEL_ID,
|
|
120
120
|
}, SELECT_KERNEL_ID, StatusbarAlignment.RIGHT, 10));
|
|
121
121
|
this._kernelInfoElement.add(kernel.onDidChange(() => this._showKernelStatus(notebook)));
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
this._kernelInfoElement.add(this._statusbarService.addEntry({
|
|
125
|
-
name: ( localize(
|
|
126
|
-
text: ( localize(
|
|
127
|
-
ariaLabel: ( localize(
|
|
125
|
+
name: ( localize(7584, "Notebook Kernel Selection")),
|
|
126
|
+
text: ( localize(7585, "Select Kernel")),
|
|
127
|
+
ariaLabel: ( localize(7585, "Select Kernel")),
|
|
128
128
|
command: SELECT_KERNEL_ID,
|
|
129
129
|
kind: 'prominent'
|
|
130
130
|
}, SELECT_KERNEL_ID, StatusbarAlignment.RIGHT, 10));
|
|
@@ -170,7 +170,7 @@ let ActiveCellStatus = class ActiveCellStatus extends Disposable {
|
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
const entry = {
|
|
173
|
-
name: ( localize(
|
|
173
|
+
name: ( localize(7586, "Notebook Editor Selections")),
|
|
174
174
|
text: newText,
|
|
175
175
|
ariaLabel: newText,
|
|
176
176
|
command: CENTER_ACTIVE_CELL
|
|
@@ -194,8 +194,8 @@ let ActiveCellStatus = class ActiveCellStatus extends Disposable {
|
|
|
194
194
|
const numSelected = editor.getSelections().reduce((prev, range) => prev + (range.end - range.start), 0);
|
|
195
195
|
const totalCells = editor.getLength();
|
|
196
196
|
return numSelected > 1 ?
|
|
197
|
-
( localize(
|
|
198
|
-
( localize(
|
|
197
|
+
( localize(7587, "Cell {0} ({1} selected)", idxFocused, numSelected)) :
|
|
198
|
+
( localize(7588, "Cell {0} of {1}", idxFocused, totalCells));
|
|
199
199
|
}
|
|
200
200
|
};
|
|
201
201
|
ActiveCellStatus = ( __decorate([
|
|
@@ -255,10 +255,10 @@ let NotebookIndentationStatus = class NotebookIndentationStatus extends Disposab
|
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
const entry = {
|
|
258
|
-
name: ( localize(
|
|
258
|
+
name: ( localize(7589, "Notebook Indentation")),
|
|
259
259
|
text: newText,
|
|
260
260
|
ariaLabel: newText,
|
|
261
|
-
tooltip: ( localize(
|
|
261
|
+
tooltip: ( localize(7590, "Select Indentation")),
|
|
262
262
|
command: SELECT_NOTEBOOK_INDENTATION_ID
|
|
263
263
|
};
|
|
264
264
|
if (!this._accessor.value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
-
import { INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-
|
|
2
|
+
import { INotebookEditor, INotebookEditorContribution } from "@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
3
3
|
import { INotebookExecutionStateService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookExecutionStateService.service";
|
|
4
4
|
import { IUserActivityService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userActivity/common/userActivityService.service";
|
|
5
5
|
export declare class ExecutionEditorProgressController extends Disposable implements INotebookEditorContribution {
|