import type * as vscode from "vscode"; import { CancellationToken } from "../../../base/common/cancellation.js"; import { UriComponents } from "../../../base/common/uri.js"; import { ExtHostChatContextShape } from "./extHost.protocol.js"; import { IExtHostRpcService } from "./extHostRpcService.js"; import { IExtHostEditorTabs } from "./extHostEditorTabs.js"; import { IChatContextItem } from "../../contrib/chat/common/contextContrib/chatContext.js"; import { Disposable } from "../../../base/common/lifecycle.js"; import { IExtHostCommands } from "./extHostCommands.js"; export declare class ExtHostChatContext extends Disposable implements ExtHostChatContextShape { private readonly _commands; private readonly _editorTabs; _serviceBrand: undefined; private _proxy; private _handlePool; private _providers; private _itemPool; /** Global map of itemHandle -> original item for command execution with reference equality */ private _globalItems; /** Track which items belong to which provider for cleanup */ private _providerItems; constructor(extHostRpc: IExtHostRpcService, _commands: IExtHostCommands, _editorTabs: IExtHostEditorTabs); $provideWorkspaceChatContext(handle: number, token: CancellationToken): Promise; $provideExplicitChatContext(handle: number, token: CancellationToken): Promise; $resolveExplicitChatContext(handle: number, context: IChatContextItem, token: CancellationToken): Promise; $provideResourceChatContext(handle: number, options: { resource: UriComponents; withValue: boolean; viewType?: string; }, token: CancellationToken): Promise; $resolveResourceChatContext(handle: number, context: IChatContextItem, token: CancellationToken): Promise; $executeChatContextItemCommand(itemHandle: number): Promise; registerChatWorkspaceContextProvider(id: string, provider: vscode.ChatWorkspaceContextProvider): vscode.Disposable; registerChatAttachContextProvider(id: string, provider: vscode.ChatAttachContextProvider): vscode.Disposable; registerChatTabContextProvider(selector: vscode.TabSelector, id: string, provider: vscode.ChatTabContextProvider): vscode.Disposable; /** * Finds the open {@link vscode.Tab tab} for the given resource. When a `viewType` is provided, * webview and custom editor tabs are matched by their view type; otherwise tabs are matched by * their input resource. When multiple tabs match by view type, the active tab is preferred. */ private _findTab; private _clearProviderItems; private _addTrackedItem; private _convertItems; private _doResolve; private _listenForWorkspaceContextChanges; dispose(): void; }