@codingame/monaco-vscode-katex-common 26.1.0 → 26.1.2
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/workbench/contrib/chat/browser/actions/chatContinueInAction.js +4 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatElicitationActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +45 -36
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatTitleActions.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionHoverWidget.js +8 -8
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsFilter.js +7 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsOpener.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/agentSessions/agentSessionsViewer.js +23 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgets.js +31 -31
- package/vscode/src/vs/workbench/contrib/chat/browser/attachments/implicitContextAttachment.js +10 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.js +33 -33
- 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/chatSessions.contribution.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.js +47 -45
- package/vscode/src/vs/workbench/contrib/chat/browser/chatSessions/searchableOptionPickerActionItem.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/viewsWelcome/chatViewWelcomeController.js +4 -4
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatAgentHover.js +2 -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/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/chatCollapsibleContentPart.d.ts +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 +5 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatConfirmationWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.d.ts +13 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatDisabledClaudeHooksContentPart.js +55 -0
- 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.d.ts +12 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatHookContentPart.js +55 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatInlineAnchorWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMarkdownContentPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatMcpServersInteractionContentPart.js +6 -6
- 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 +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.js +96 -53
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuotaExceededPart.js +4 -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/chatSubagentContentPart.d.ts +15 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSubagentContentPart.js +83 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatSuggestNextWidget.js +5 -5
- 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.js +26 -10
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatTodoListWidget.js +16 -16
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolInputOutputContentPart.js +2 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatToolOutputContentSubPart.js +5 -5
- 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/chatDisabledClaudeHooksContent.css +14 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatHookContentPart.css +44 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/media/chatQuestionCarousel.css +15 -22
- 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/chatTerminalToolConfirmationSubPart.js +15 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatTerminalToolProgressPart.js +18 -18
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolConfirmationSubPart.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolInvocationPart.js +3 -1
- 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 +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolPostExecuteConfirmationPart.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatContentParts/toolInvocationParts/chatToolProgressPart.js +14 -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 +8 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.js +206 -41
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatListWidget.js +12 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPendingDragAndDrop.d.ts +27 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatPendingDragAndDrop.js +148 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.d.ts +5 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/chatWidget.js +108 -51
- 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 +14 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.js +59 -15
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/chatSelectedTools.js +1 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.js +5 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.d.ts +2 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modePickerActionItem.js +12 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/modelPickerActionItem.js +13 -13
- package/vscode/src/vs/workbench/contrib/chat/browser/widget/input/sessionTargetPickerActionItem.js +13 -5
- 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 +90 -7
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageDetails.js +6 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/widget/chatColors.js +14 -14
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +3 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatGutterAffordance.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatOverlayWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +5 -5
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +32 -32
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.d.ts +0 -7
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveCommon.js +0 -11
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.d.ts +0 -20
- package/vscode/src/vs/workbench/contrib/interactive/browser/replInputHintContentWidget.js +0 -150
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.d.ts +0 -22
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController.js +0 -338
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.d.ts +0 -18
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver.js +0 -58
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.d.ts +0 -75
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +0 -364
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/interactiveEditor.css +0 -21
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/media/interactive.css +0 -36
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.d.ts +0 -110
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditor.js +0 -692
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.d.ts +0 -40
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorInput.js +0 -158
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
2
|
-
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
3
|
-
import { ITextResourceConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service";
|
|
4
|
-
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
5
|
-
import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
6
|
-
import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
|
|
7
|
-
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
8
|
-
import { IInteractiveHistoryService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.service";
|
|
9
|
-
import { NotebookTextModel } from "@codingame/monaco-vscode-notebook-service-override/vscode/vs/workbench/contrib/notebook/common/model/notebookTextModel";
|
|
10
|
-
import { ICompositeNotebookEditorInput, NotebookEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput";
|
|
11
|
-
import { INotebookEditorModelResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service";
|
|
12
|
-
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
13
|
-
import { ICustomEditorLabelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/customEditorLabelService.service";
|
|
14
|
-
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
15
|
-
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
16
|
-
import { IFilesConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service";
|
|
17
|
-
import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
18
|
-
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
19
|
-
import { IPathService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service";
|
|
20
|
-
export declare class ReplEditorInput extends NotebookEditorInput implements ICompositeNotebookEditorInput {
|
|
21
|
-
readonly historyService: IInteractiveHistoryService;
|
|
22
|
-
private readonly _textModelService;
|
|
23
|
-
static ID: string;
|
|
24
|
-
private inputModelRef;
|
|
25
|
-
private isScratchpad;
|
|
26
|
-
private label;
|
|
27
|
-
private isDisposing;
|
|
28
|
-
constructor(resource: URI, label: string | undefined, _notebookService: INotebookService, _notebookModelResolverService: INotebookEditorModelResolverService, _fileDialogService: IFileDialogService, labelService: ILabelService, fileService: IFileService, filesConfigurationService: IFilesConfigurationService, extensionService: IExtensionService, editorService: IEditorService, textResourceConfigurationService: ITextResourceConfigurationService, customEditorLabelService: ICustomEditorLabelService, historyService: IInteractiveHistoryService, _textModelService: ITextModelService, configurationService: IConfigurationService, environmentService: IWorkbenchEnvironmentService, pathService: IPathService);
|
|
29
|
-
getIcon(): ThemeIcon | undefined;
|
|
30
|
-
private createEditorLabel;
|
|
31
|
-
get typeId(): string;
|
|
32
|
-
get editorId(): string | undefined;
|
|
33
|
-
getName(): string;
|
|
34
|
-
get editorInputs(): this[];
|
|
35
|
-
get capabilities(): number;
|
|
36
|
-
resolve(): Promise<import("@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon").IResolvedNotebookEditorModel | null>;
|
|
37
|
-
private ensureInputBoxCell;
|
|
38
|
-
resolveInput(notebook: NotebookTextModel): Promise<import("@codingame/monaco-vscode-api/vscode/vs/editor/common/model").ITextModel>;
|
|
39
|
-
dispose(): void;
|
|
40
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
-
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
4
|
-
import { ITextResourceConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/textResourceConfiguration.service';
|
|
5
|
-
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
6
|
-
import { IFileDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
7
|
-
import { IFileService } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service';
|
|
8
|
-
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
9
|
-
import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
10
|
-
import { IInteractiveHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.service';
|
|
11
|
-
import { NotebookSetting, CellKind, CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
|
-
import { NotebookEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
13
|
-
import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
|
|
14
|
-
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
15
|
-
import { ICustomEditorLabelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/customEditorLabelService.service';
|
|
16
|
-
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
17
|
-
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
18
|
-
import { IFilesConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/filesConfiguration/common/filesConfigurationService.service';
|
|
19
|
-
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
20
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
21
|
-
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
22
|
-
import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
|
|
23
|
-
import { IPathService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/path/common/pathService.service';
|
|
24
|
-
|
|
25
|
-
var ReplEditorInput_1;
|
|
26
|
-
const replTabIcon = registerIcon("repl-editor-label-icon", Codicon.debugLineByLine, ( localize(10752, "Icon of the REPL editor label.")));
|
|
27
|
-
let ReplEditorInput = class ReplEditorInput extends NotebookEditorInput {
|
|
28
|
-
static {
|
|
29
|
-
ReplEditorInput_1 = this;
|
|
30
|
-
}
|
|
31
|
-
static {
|
|
32
|
-
this.ID = "workbench.editorinputs.replEditorInput";
|
|
33
|
-
}
|
|
34
|
-
constructor(
|
|
35
|
-
resource,
|
|
36
|
-
label,
|
|
37
|
-
_notebookService,
|
|
38
|
-
_notebookModelResolverService,
|
|
39
|
-
_fileDialogService,
|
|
40
|
-
labelService,
|
|
41
|
-
fileService,
|
|
42
|
-
filesConfigurationService,
|
|
43
|
-
extensionService,
|
|
44
|
-
editorService,
|
|
45
|
-
textResourceConfigurationService,
|
|
46
|
-
customEditorLabelService,
|
|
47
|
-
historyService,
|
|
48
|
-
_textModelService,
|
|
49
|
-
configurationService,
|
|
50
|
-
environmentService,
|
|
51
|
-
pathService
|
|
52
|
-
) {
|
|
53
|
-
super(
|
|
54
|
-
resource,
|
|
55
|
-
undefined,
|
|
56
|
-
"jupyter-notebook",
|
|
57
|
-
{},
|
|
58
|
-
_notebookService,
|
|
59
|
-
_notebookModelResolverService,
|
|
60
|
-
_fileDialogService,
|
|
61
|
-
labelService,
|
|
62
|
-
fileService,
|
|
63
|
-
filesConfigurationService,
|
|
64
|
-
extensionService,
|
|
65
|
-
editorService,
|
|
66
|
-
textResourceConfigurationService,
|
|
67
|
-
customEditorLabelService,
|
|
68
|
-
environmentService,
|
|
69
|
-
pathService
|
|
70
|
-
);
|
|
71
|
-
this.historyService = historyService;
|
|
72
|
-
this._textModelService = _textModelService;
|
|
73
|
-
this.isDisposing = false;
|
|
74
|
-
this.isScratchpad = resource.scheme === "untitled" && configurationService.getValue(NotebookSetting.InteractiveWindowPromptToSave) !== true;
|
|
75
|
-
this.label = label ?? this.createEditorLabel(resource);
|
|
76
|
-
}
|
|
77
|
-
getIcon() {
|
|
78
|
-
return replTabIcon;
|
|
79
|
-
}
|
|
80
|
-
createEditorLabel(resource) {
|
|
81
|
-
if (!resource) {
|
|
82
|
-
return "REPL";
|
|
83
|
-
}
|
|
84
|
-
if (resource.scheme === "untitled") {
|
|
85
|
-
const match = ( new RegExp("Untitled-(\\d+).")).exec(resource.path);
|
|
86
|
-
if (match?.length === 2) {
|
|
87
|
-
return `REPL - ${match[1]}`;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
const filename = resource.path.split("/").pop();
|
|
91
|
-
return filename ? `REPL - ${filename}` : "REPL";
|
|
92
|
-
}
|
|
93
|
-
get typeId() {
|
|
94
|
-
return ReplEditorInput_1.ID;
|
|
95
|
-
}
|
|
96
|
-
get editorId() {
|
|
97
|
-
return "repl";
|
|
98
|
-
}
|
|
99
|
-
getName() {
|
|
100
|
-
return this.label;
|
|
101
|
-
}
|
|
102
|
-
get editorInputs() {
|
|
103
|
-
return [this];
|
|
104
|
-
}
|
|
105
|
-
get capabilities() {
|
|
106
|
-
const capabilities = super.capabilities;
|
|
107
|
-
const scratchPad = this.isScratchpad ? EditorInputCapabilities.Scratchpad : 0;
|
|
108
|
-
return capabilities | EditorInputCapabilities.Readonly | scratchPad;
|
|
109
|
-
}
|
|
110
|
-
async resolve() {
|
|
111
|
-
const model = await super.resolve();
|
|
112
|
-
if (model) {
|
|
113
|
-
this.ensureInputBoxCell(model.notebook);
|
|
114
|
-
}
|
|
115
|
-
return model;
|
|
116
|
-
}
|
|
117
|
-
ensureInputBoxCell(notebook) {
|
|
118
|
-
const lastCell = notebook.cells[notebook.cells.length - 1];
|
|
119
|
-
if (!lastCell || lastCell.cellKind === CellKind.Markup || lastCell.outputs.length > 0 || lastCell.internalMetadata.executionOrder !== undefined) {
|
|
120
|
-
notebook.applyEdits([{
|
|
121
|
-
editType: CellEditType.Replace,
|
|
122
|
-
index: notebook.cells.length,
|
|
123
|
-
count: 0,
|
|
124
|
-
cells: [{
|
|
125
|
-
cellKind: CellKind.Code,
|
|
126
|
-
language: "python",
|
|
127
|
-
mime: undefined,
|
|
128
|
-
outputs: [],
|
|
129
|
-
source: ""
|
|
130
|
-
}]
|
|
131
|
-
}], true, undefined, () => undefined, undefined, false);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
async resolveInput(notebook) {
|
|
135
|
-
if (this.inputModelRef) {
|
|
136
|
-
return this.inputModelRef.object.textEditorModel;
|
|
137
|
-
}
|
|
138
|
-
const lastCell = notebook.cells[notebook.cells.length - 1];
|
|
139
|
-
if (!lastCell) {
|
|
140
|
-
throw ( new Error("The REPL editor requires at least one cell for the input box."));
|
|
141
|
-
}
|
|
142
|
-
this.inputModelRef = await this._textModelService.createModelReference(lastCell.uri);
|
|
143
|
-
return this.inputModelRef.object.textEditorModel;
|
|
144
|
-
}
|
|
145
|
-
dispose() {
|
|
146
|
-
if (!this.isDisposing) {
|
|
147
|
-
this.isDisposing = true;
|
|
148
|
-
this.editorModelReference?.object.revert({
|
|
149
|
-
soft: true
|
|
150
|
-
});
|
|
151
|
-
this.inputModelRef?.dispose();
|
|
152
|
-
super.dispose();
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
ReplEditorInput = ReplEditorInput_1 = ( __decorate([( __param(2, INotebookService)), ( __param(3, INotebookEditorModelResolverService)), ( __param(4, IFileDialogService)), ( __param(5, ILabelService)), ( __param(6, IFileService)), ( __param(7, IFilesConfigurationService)), ( __param(8, IExtensionService)), ( __param(9, IEditorService)), ( __param(10, ITextResourceConfigurationService)), ( __param(11, ICustomEditorLabelService)), ( __param(12, IInteractiveHistoryService)), ( __param(13, ITextModelService)), ( __param(14, IConfigurationService)), ( __param(15, IWorkbenchEnvironmentService)), ( __param(16, IPathService))], ReplEditorInput));
|
|
157
|
-
|
|
158
|
-
export { ReplEditorInput };
|