@codingame/monaco-vscode-katex-common 29.1.1 → 30.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 +2 -2
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +14 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/accessibility/chatAccessibilityProvider.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatContinueInAction.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +34 -34
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +12 -20
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.d.ts +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolActions.js +208 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.d.ts +22 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatToolPicker.js +637 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionApprovalModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.d.ts +9 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsControl.js +202 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.d.ts +4 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +17 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.d.ts +53 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +296 -63
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/media/agentsessionsviewer.css +59 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +55 -42
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +110 -59
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorActions.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingEditorOverlay.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationWidget.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessionPickerActionItem.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.js +384 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.d.ts +12 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatArtifactsWidget.js +220 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentMarkdownRenderer.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAgentCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAnonymousRateLimitedPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.d.ts +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatAttachmentsContentPart.js +14 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatChangesSummaryPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCodeCitationContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatCommandContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatContentCodePools.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatExtensionsContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.d.ts +5 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.d.ts +11 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +40 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMultiDiffContentPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatProgressContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +97 -54
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +5 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatReferencesContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatResourceGroupWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +8 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTextEditContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.d.ts +15 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.js +155 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTipContentPart.js +9 -9
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +36 -19
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTreeContentPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatWorkspaceEditContentPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/codeBlockPart.js +14 -14
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatThinkingContent.css +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/abstractToolConfirmationSubPart.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatExtensionsInstallToolSubPart.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMcpAppSubPart.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatMissingSandboxDepsConfirmationSubPart.js +68 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatModifiedFilesConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolConfirmationSubPart.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +33 -25
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolOutputPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPartUtilities.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatDragAndDrop.js +11 -11
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.d.ts +4 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +37 -113
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +10 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +66 -39
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatFollowups.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.d.ts +13 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +103 -61
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.js +35 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.d.ts +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem2.js +4 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.js +39 -24
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.d.ts +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +44 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/workspacePickerActionItem.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/media/chat.css +60 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatImageExtraction.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/common/widget/codeBlockModelCollection.js +4 -0
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +4 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.d.ts +4 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.js +5 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +6 -11
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +39 -39
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +7 -7
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOperations.js +746 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/insertCellActions.js +300 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffCellEditorOptions.js +55 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.d.ts +273 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffComponents.js +1963 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.d.ts +50 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementOutputs.js +314 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.d.ts +258 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffElementViewModel.js +886 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.d.ts +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/diffNestedCellViewModel.js +118 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/editorHeightCalculator.js +71 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/eventDispatcher.js +40 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.d.ts +23 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookCellDiffDecorator.js +313 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.d.ts +51 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookDeletedCellDecorator.js +265 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.d.ts +24 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiff.js +185 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.d.ts +28 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInlineDiffWidget.js +104 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookInsertedCellDecorator.js +43 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.d.ts +21 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.js +41 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.d.ts +25 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.js +69 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiff.css +469 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.d.ts +149 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.js +933 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.d.ts +180 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser.js +32 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.d.ts +102 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffList.js +643 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.d.ts +30 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler.js +197 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.d.ts +75 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/notebookDiffViewModel.js +539 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/diff/unchangedEditorRegions.js +39 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.d.ts +19 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookMetadataTextModel.js +90 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.d.ts +26 -0
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookDiff.js +92 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +1 -1
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.d.ts +0 -152
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +0 -1317
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.d.ts +0 -47
- package/vscode/src/vs/workbench/contrib/chat/common/promptSyntax/internalCustomizations/internalPromptFileSystem.js +0 -95
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { CellDiffInfo } from "../notebookDiffViewModel.js";
|
|
3
|
+
import { INotebookEditor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser";
|
|
4
|
+
export declare class NotebookInsertedCellDecorator extends Disposable {
|
|
5
|
+
private readonly notebookEditor;
|
|
6
|
+
private readonly decorators;
|
|
7
|
+
constructor(notebookEditor: INotebookEditor);
|
|
8
|
+
apply(diffInfo: CellDiffInfo[]): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { Disposable, DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
3
|
+
import { NotebookOverviewRulerLane } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
4
|
+
import { overviewRulerAddedForeground } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
5
|
+
|
|
6
|
+
class NotebookInsertedCellDecorator extends Disposable {
|
|
7
|
+
constructor(notebookEditor) {
|
|
8
|
+
super();
|
|
9
|
+
this.notebookEditor = notebookEditor;
|
|
10
|
+
this.decorators = this._register(( new DisposableStore()));
|
|
11
|
+
}
|
|
12
|
+
apply(diffInfo) {
|
|
13
|
+
const model = this.notebookEditor.textModel;
|
|
14
|
+
if (!model) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const cells = ( diffInfo.filter(diff => diff.type === "insert").map(diff => model.cells[diff.modifiedCellIndex]));
|
|
18
|
+
const ids = this.notebookEditor.deltaCellDecorations([], ( cells.map(cell => ({
|
|
19
|
+
handle: cell.handle,
|
|
20
|
+
options: {
|
|
21
|
+
className: "nb-insertHighlight",
|
|
22
|
+
outputClassName: "nb-insertHighlight",
|
|
23
|
+
overviewRuler: {
|
|
24
|
+
color: overviewRulerAddedForeground,
|
|
25
|
+
modelRanges: [],
|
|
26
|
+
includeOutput: true,
|
|
27
|
+
position: NotebookOverviewRulerLane.Full
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}))));
|
|
31
|
+
this.clear();
|
|
32
|
+
this.decorators.add(toDisposable(() => {
|
|
33
|
+
if (!this.notebookEditor.isDisposed) {
|
|
34
|
+
this.notebookEditor.deltaCellDecorations(ids, []);
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
clear() {
|
|
39
|
+
this.decorators.clear();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { NotebookInsertedCellDecorator };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IReference, ReferenceCollection } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
3
|
+
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
4
|
+
import { CellKind } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon";
|
|
5
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
6
|
+
import { ILanguageService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service";
|
|
7
|
+
import { IModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service";
|
|
8
|
+
import { INotebookOriginalCellModelFactory } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalCellModelFactory.service";
|
|
9
|
+
export declare class OriginalNotebookCellModelReferenceCollection extends ReferenceCollection<ITextModel> {
|
|
10
|
+
private readonly modelService;
|
|
11
|
+
private readonly _languageService;
|
|
12
|
+
constructor(modelService: IModelService, _languageService: ILanguageService);
|
|
13
|
+
protected createReferencedObject(_key: string, uri: URI, cellValue: string, language: string, cellKind: CellKind): ITextModel;
|
|
14
|
+
protected destroyReferencedObject(_key: string, model: ITextModel): void;
|
|
15
|
+
}
|
|
16
|
+
export declare class OriginalNotebookCellModelFactory implements INotebookOriginalCellModelFactory {
|
|
17
|
+
readonly _serviceBrand: undefined;
|
|
18
|
+
private readonly _data;
|
|
19
|
+
constructor(instantiationService: IInstantiationService);
|
|
20
|
+
getOrCreate(uri: URI, cellValue: string, language: string, cellKind: CellKind): IReference<ITextModel>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { ReferenceCollection } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
5
|
+
import { CellKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
6
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
|
+
import { ILanguageService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/language.service';
|
|
8
|
+
import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
|
|
9
|
+
|
|
10
|
+
let OriginalNotebookCellModelReferenceCollection = class OriginalNotebookCellModelReferenceCollection extends ReferenceCollection {
|
|
11
|
+
constructor(modelService, _languageService) {
|
|
12
|
+
super();
|
|
13
|
+
this.modelService = modelService;
|
|
14
|
+
this._languageService = _languageService;
|
|
15
|
+
}
|
|
16
|
+
createReferencedObject(_key, uri, cellValue, language, cellKind) {
|
|
17
|
+
const scheme = `${uri.scheme}-chat-edit`;
|
|
18
|
+
const originalCellUri = ( URI.from({
|
|
19
|
+
scheme,
|
|
20
|
+
fragment: uri.fragment,
|
|
21
|
+
path: uri.path
|
|
22
|
+
}));
|
|
23
|
+
const languageSelection = this._languageService.getLanguageIdByLanguageName(language) ? this._languageService.createById(language) : cellKind === CellKind.Markup ? this._languageService.createById("markdown") : null;
|
|
24
|
+
return this.modelService.createModel(cellValue, languageSelection, originalCellUri);
|
|
25
|
+
}
|
|
26
|
+
destroyReferencedObject(_key, model) {
|
|
27
|
+
model.dispose();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
OriginalNotebookCellModelReferenceCollection = ( __decorate([( __param(0, IModelService)), ( __param(1, ILanguageService))], OriginalNotebookCellModelReferenceCollection));
|
|
31
|
+
let OriginalNotebookCellModelFactory = class OriginalNotebookCellModelFactory {
|
|
32
|
+
constructor(instantiationService) {
|
|
33
|
+
this._data = instantiationService.createInstance(OriginalNotebookCellModelReferenceCollection);
|
|
34
|
+
}
|
|
35
|
+
getOrCreate(uri, cellValue, language, cellKind) {
|
|
36
|
+
return this._data.acquire(( uri.toString()), uri, cellValue, language, cellKind);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
OriginalNotebookCellModelFactory = ( __decorate([( __param(0, IInstantiationService))], OriginalNotebookCellModelFactory));
|
|
40
|
+
|
|
41
|
+
export { OriginalNotebookCellModelFactory, OriginalNotebookCellModelReferenceCollection };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IReference, ReferenceCollection } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IModifiedFileEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/editing/chatEditingService";
|
|
3
|
+
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
4
|
+
import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
|
|
5
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
6
|
+
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
7
|
+
import { INotebookOriginalModelReferenceFactory } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory.service";
|
|
8
|
+
export declare class OriginalNotebookModelReferenceCollection extends ReferenceCollection<Promise<NotebookTextModel>> {
|
|
9
|
+
private readonly notebookService;
|
|
10
|
+
private readonly modelService;
|
|
11
|
+
private readonly modelsToDispose;
|
|
12
|
+
constructor(notebookService: INotebookService, modelService: ITextModelService);
|
|
13
|
+
protected createReferencedObject(key: string, fileEntry: IModifiedFileEntry, viewType: string): Promise<NotebookTextModel>;
|
|
14
|
+
protected destroyReferencedObject(key: string, modelPromise: Promise<NotebookTextModel>): void;
|
|
15
|
+
}
|
|
16
|
+
export declare class NotebookOriginalModelReferenceFactory implements INotebookOriginalModelReferenceFactory {
|
|
17
|
+
private readonly instantiationService;
|
|
18
|
+
readonly _serviceBrand: undefined;
|
|
19
|
+
private _resourceModelCollection;
|
|
20
|
+
private get resourceModelCollection();
|
|
21
|
+
private _asyncModelCollection;
|
|
22
|
+
private get asyncModelCollection();
|
|
23
|
+
constructor(instantiationService: IInstantiationService);
|
|
24
|
+
getOrCreate(fileEntry: IModifiedFileEntry, viewType: string): Promise<IReference<NotebookTextModel>>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { ReferenceCollection, AsyncReferenceCollection } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
5
|
+
import { VSBuffer, bufferToStream } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
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';
|
|
8
|
+
|
|
9
|
+
let OriginalNotebookModelReferenceCollection = class OriginalNotebookModelReferenceCollection extends ReferenceCollection {
|
|
10
|
+
constructor(notebookService, modelService) {
|
|
11
|
+
super();
|
|
12
|
+
this.notebookService = notebookService;
|
|
13
|
+
this.modelService = modelService;
|
|
14
|
+
this.modelsToDispose = ( new Set());
|
|
15
|
+
}
|
|
16
|
+
async createReferencedObject(key, fileEntry, viewType) {
|
|
17
|
+
this.modelsToDispose.delete(key);
|
|
18
|
+
const uri = fileEntry.originalURI;
|
|
19
|
+
const model = this.notebookService.getNotebookTextModel(uri);
|
|
20
|
+
if (model) {
|
|
21
|
+
return model;
|
|
22
|
+
}
|
|
23
|
+
const modelRef = await this.modelService.createModelReference(uri);
|
|
24
|
+
const bytes = VSBuffer.fromString(modelRef.object.textEditorModel.getValue());
|
|
25
|
+
const stream = bufferToStream(bytes);
|
|
26
|
+
modelRef.dispose();
|
|
27
|
+
return this.notebookService.createNotebookTextModel(viewType, uri, stream);
|
|
28
|
+
}
|
|
29
|
+
destroyReferencedObject(key, modelPromise) {
|
|
30
|
+
this.modelsToDispose.add(key);
|
|
31
|
+
(async () => {
|
|
32
|
+
try {
|
|
33
|
+
const model = await modelPromise;
|
|
34
|
+
if (!( this.modelsToDispose.has(key))) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
model.dispose();
|
|
38
|
+
} catch (error) {} finally {
|
|
39
|
+
this.modelsToDispose.delete(key);
|
|
40
|
+
}
|
|
41
|
+
})();
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
OriginalNotebookModelReferenceCollection = ( __decorate([( __param(0, INotebookService)), ( __param(1, ITextModelService))], OriginalNotebookModelReferenceCollection));
|
|
45
|
+
let NotebookOriginalModelReferenceFactory = class NotebookOriginalModelReferenceFactory {
|
|
46
|
+
get resourceModelCollection() {
|
|
47
|
+
if (!this._resourceModelCollection) {
|
|
48
|
+
this._resourceModelCollection = this.instantiationService.createInstance(OriginalNotebookModelReferenceCollection);
|
|
49
|
+
}
|
|
50
|
+
return this._resourceModelCollection;
|
|
51
|
+
}
|
|
52
|
+
get asyncModelCollection() {
|
|
53
|
+
if (!this._asyncModelCollection) {
|
|
54
|
+
this._asyncModelCollection = ( new AsyncReferenceCollection(this.resourceModelCollection));
|
|
55
|
+
}
|
|
56
|
+
return this._asyncModelCollection;
|
|
57
|
+
}
|
|
58
|
+
constructor(instantiationService) {
|
|
59
|
+
this.instantiationService = instantiationService;
|
|
60
|
+
this._resourceModelCollection = undefined;
|
|
61
|
+
this._asyncModelCollection = undefined;
|
|
62
|
+
}
|
|
63
|
+
getOrCreate(fileEntry, viewType) {
|
|
64
|
+
return this.asyncModelCollection.acquire(( fileEntry.originalURI.toString()), fileEntry, viewType);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
NotebookOriginalModelReferenceFactory = ( __decorate([( __param(0, IInstantiationService))], NotebookOriginalModelReferenceFactory));
|
|
68
|
+
|
|
69
|
+
export { NotebookOriginalModelReferenceFactory, OriginalNotebookModelReferenceCollection };
|