import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation"; import { Emitter } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { ICodeEditor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorBrowser"; import { ICodeEditorService } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service"; import { IPosition, Position } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/position"; import { IRange } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range"; import { ISelection } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/core/selection"; import { IEditorContribution } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/editorCommon"; import { TextEdit } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages"; import { IEditorWorkerService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/editorWorker.service"; import { IMarkerDecorationsService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/markerDecorations.service"; import { EditSuggestionId } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/textModelEditSource"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service"; import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IInstantiationService, ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { ISharedWebContentExtractorService } from "@codingame/monaco-vscode-api/vscode/vs/platform/webContentExtractor/common/webContentExtractor.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IChatAttachmentResolveService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatAttachmentResolveService.service"; import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service"; import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatVariableEntries"; import { INotebookEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service"; import { ICellEditOperation } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon"; import { HunkInformation, Session } from "./inlineChatSession.js"; import { IInlineChatSessionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatSessionService.service"; import { EditorBasedInlineChatWidget } from "./inlineChatWidget.js"; export declare enum State { CREATE_SESSION = "CREATE_SESSION", INIT_UI = "INIT_UI", WAIT_FOR_INPUT = "WAIT_FOR_INPUT", SHOW_REQUEST = "SHOW_REQUEST", PAUSE = "PAUSE", CANCEL = "CANCEL", ACCEPT = "DONE" } export declare abstract class InlineChatRunOptions { initialSelection?: ISelection; initialRange?: IRange; message?: string; attachments?: URI[]; autoSend?: boolean; existingSession?: Session; position?: IPosition; static isInlineChatRunOptions(options: any): options is InlineChatRunOptions; } export declare class InlineChatController implements IEditorContribution { private readonly _notebookEditorService; static ID: string; static get(editor: ICodeEditor): InlineChatController | null; private readonly _delegate; constructor(editor: ICodeEditor, configurationService: IConfigurationService, _notebookEditorService: INotebookEditorService); dispose(): void; get isActive(): boolean; run(arg?: InlineChatRunOptions): Promise; focus(): void; get widget(): EditorBasedInlineChatWidget; getWidgetPosition(): Position | undefined; acceptSession(): void; } /** * @deprecated */ export declare class InlineChatController1 implements IEditorContribution { private readonly _editor; private readonly _instaService; private readonly _inlineChatSessionService; private readonly _editorWorkerService; private readonly _logService; private readonly _configurationService; private readonly _dialogService; private readonly _chatService; private readonly _editorService; private readonly _webContentExtractorService; private readonly _fileService; private readonly _chatAttachmentResolveService; static get(editor: ICodeEditor): InlineChatController1 | null; private _isDisposed; private readonly _store; private readonly _ui; private readonly _ctxVisible; private readonly _ctxEditing; private readonly _ctxResponseType; private readonly _ctxRequestInProgress; private readonly _ctxResponse; private readonly _messages; protected readonly _onDidEnterState: Emitter; get chatWidget(): import("../../chat/browser/chatWidget.js").ChatWidget; private readonly _sessionStore; private readonly _stashedSession; private _delegateSession?; private _session?; private _strategy?; constructor(_editor: ICodeEditor, _instaService: IInstantiationService, _inlineChatSessionService: IInlineChatSessionService, _editorWorkerService: IEditorWorkerService, _logService: ILogService, _configurationService: IConfigurationService, _dialogService: IDialogService, contextKeyService: IContextKeyService, _chatService: IChatService, _editorService: IEditorService, notebookEditorService: INotebookEditorService, _webContentExtractorService: ISharedWebContentExtractorService, _fileService: IFileService, _chatAttachmentResolveService: IChatAttachmentResolveService); dispose(): void; private _log; get widget(): EditorBasedInlineChatWidget; getId(): string; getWidgetPosition(): Position | undefined; private _currentRun?; run(options?: InlineChatRunOptions | undefined): Promise; protected _nextState(state: State, options: InlineChatRunOptions): Promise; private [State.CREATE_SESSION]; private [State.INIT_UI]; private [State.WAIT_FOR_INPUT]; private [State.SHOW_REQUEST]; private [State.PAUSE]; private [State.ACCEPT]; private [State.CANCEL]; private _showWidget; private _resetWidget; private _updateCtxResponseType; private _createChatTextEditGroupState; private _makeChanges; private _getMetadata; private _updatePlaceholder; private _updateInput; arrowOut(up: boolean): void; focus(): void; viewInChat(): Promise; acceptSession(): void; acceptHunk(hunkInfo?: HunkInformation): void | undefined; discardHunk(hunkInfo?: HunkInformation): void | undefined; toggleDiff(hunkInfo?: HunkInformation): void | undefined; moveHunk(next: boolean): void; cancelSession(): Promise; reportIssue(): void; unstashLastSession(): Session | undefined; joinCurrentRun(): Promise | undefined; get isActive(): boolean; createImageAttachment(attachment: URI): Promise; } export declare class InlineChatController2 implements IEditorContribution { private readonly _editor; private readonly _instaService; private readonly _notebookEditorService; private readonly _inlineChatSessions; private readonly _webContentExtractorService; private readonly _fileService; private readonly _chatAttachmentResolveService; private readonly _editorService; private readonly _markerDecorationsService; static readonly ID = "editor.contrib.inlineChatController2"; static get(editor: ICodeEditor): InlineChatController2 | undefined; private readonly _store; private readonly _isActiveController; private readonly _zone; private readonly _currentSession; get widget(): EditorBasedInlineChatWidget; get isActive(): boolean; constructor(_editor: ICodeEditor, _instaService: IInstantiationService, _notebookEditorService: INotebookEditorService, _inlineChatSessions: IInlineChatSessionService, codeEditorService: ICodeEditorService, contextKeyService: IContextKeyService, _webContentExtractorService: ISharedWebContentExtractorService, _fileService: IFileService, _chatAttachmentResolveService: IChatAttachmentResolveService, _editorService: IEditorService, _markerDecorationsService: IMarkerDecorationsService, inlineChatService: IInlineChatSessionService, chatService: IChatService); dispose(): void; getWidgetPosition(): Position | undefined; focus(): void; markActiveController(): void; run(arg?: InlineChatRunOptions): Promise; acceptSession(): void; createImageAttachment(attachment: URI): Promise; } export declare function reviewEdits(accessor: ServicesAccessor, editor: ICodeEditor, stream: AsyncIterable, token: CancellationToken, applyCodeBlockSuggestionId: EditSuggestionId | undefined): Promise; export declare function reviewNotebookEdits(accessor: ServicesAccessor, uri: URI, stream: AsyncIterable<[ URI, TextEdit[] ] | ICellEditOperation[]>, token: CancellationToken): Promise;