import { Event, IDisposable, UriComponents } from '@opensumi/ide-core-common'; import { EditorGroupColumn } from '@opensumi/ide-editor/lib/common'; import type * as vscode from 'vscode'; export interface IEditorTab { name: string; group: number; resource: vscode.Uri; isActive: boolean; } export interface IExtHostEditorTabsLegacyProposed { readonly _serviceBrand: undefined; tabs: readonly IEditorTab[]; onDidChangeTabs: Event; } export declare const IExtHostEditorTabs: unique symbol; export declare const enum TabInputKind { UnknownInput = 0, TextInput = 1, TextDiffInput = 2, TextMergeInput = 3, NotebookInput = 4, NotebookDiffInput = 5, CustomEditorInput = 6, WebviewEditorInput = 7, TerminalEditorInput = 8, InteractiveEditorInput = 9 } export declare const enum TabModelOperationKind { TAB_OPEN = 0, TAB_CLOSE = 1, TAB_UPDATE = 2, TAB_MOVE = 3 } export interface UnknownInputDto { kind: TabInputKind.UnknownInput; } export interface TextInputDto { kind: TabInputKind.TextInput; uri: UriComponents; } export interface TextDiffInputDto { kind: TabInputKind.TextDiffInput; original: UriComponents; modified: UriComponents; } export interface TextMergeInputDto { kind: TabInputKind.TextMergeInput; base: UriComponents; input1: UriComponents; input2: UriComponents; result: UriComponents; } export interface NotebookInputDto { kind: TabInputKind.NotebookInput; notebookType: string; uri: UriComponents; } export interface NotebookDiffInputDto { kind: TabInputKind.NotebookDiffInput; notebookType: string; original: UriComponents; modified: UriComponents; } export interface CustomInputDto { kind: TabInputKind.CustomEditorInput; viewType: string; uri: UriComponents; } export interface WebviewInputDto { kind: TabInputKind.WebviewEditorInput; viewType: string; } export interface InteractiveEditorInputDto { kind: TabInputKind.InteractiveEditorInput; uri: UriComponents; inputBoxUri: UriComponents; } export interface TabInputDto { kind: TabInputKind.TerminalEditorInput; } export type AnyInputDto = UnknownInputDto | TextInputDto | TextDiffInputDto | TextMergeInputDto | NotebookInputDto | NotebookDiffInputDto | CustomInputDto | WebviewInputDto | InteractiveEditorInputDto | TabInputDto; export interface IMainThreadEditorTabsShape extends IDisposable { $initializeState(): void; $moveTab(tabId: string, index: number, viewColumn: EditorGroupColumn, preserveFocus?: boolean): void; $closeTab(tabIds: string[], preserveFocus?: boolean): Promise; $closeGroup(groupIds: number[], preservceFocus?: boolean): Promise; } export interface IEditorTabGroupDto { isActive: boolean; viewColumn: EditorGroupColumn; tabs: IEditorTabDto[]; groupId: number; } export interface TabOperation { readonly kind: TabModelOperationKind.TAB_OPEN | TabModelOperationKind.TAB_CLOSE | TabModelOperationKind.TAB_UPDATE | TabModelOperationKind.TAB_MOVE; readonly index: number; readonly tabDto: IEditorTabDto; readonly groupId: number; readonly oldIndex?: number; } export interface IEditorTabDto { id: string; label: string; input: AnyInputDto; editorId?: string; isActive: boolean; isPinned: boolean; isPreview: boolean; isDirty: boolean; } export interface IExtHostEditorTabsShape { $acceptEditorTabModel(tabGroups: IEditorTabGroupDto[]): void; $acceptTabGroupUpdate(groupDto: IEditorTabGroupDto): void; $acceptTabOperation(operation: TabOperation): void; } export interface IExtHostEditorTabs extends IExtHostEditorTabsLegacyProposed, IExtHostEditorTabsShape { } //# sourceMappingURL=editor-tabs.d.ts.map