import { ICodeEditor } from "../../../../editor/browser/editorBrowser.js"; import { IDialogService } from "../../../../platform/dialogs/common/dialogs.service.js"; import { IStorageService } from "../../../../platform/storage/common/storage.service.js"; /** * Returns whether the current input `value` would be executed as a terminal * command, i.e. a `prefix` is advertised and the value begins with it. Chat * inputs use this to switch to a monospace font while a command is composed. */ export declare function isTerminalCommandInput(value: string, prefix: string | undefined): boolean; /** Paste context used to detect terminal command prefixes at the start of chat input. */ interface ITerminalCommandPaste { readonly prefix: string; readonly pastedText: string; readonly currentValue: string; readonly selectionStartOffset: number; readonly selectionEndOffset: number; } /** Returns whether applying the paste would make the input start with the command prefix. */ export declare function isTerminalCommandPaste(paste: ITerminalCommandPaste): boolean; /** * Shared capture-phase paste handler for chat inputs. When the attached session * advertises a terminal command `prefix` and the pasted text would make the * input begin with that prefix (i.e. run as a command), warns the user before * inserting — unless they have globally suppressed the warning. On confirmation * the text is inserted via the editor's paste command; on cancel nothing is * inserted. When the paste would not become a command the event is left * untouched for default handling. * * This intercepts at the capture-phase DOM `paste` event — strictly before the * editor's own paste handling (`onWillPaste`/`CopyPasteController`) — because a * veto/confirmation must gate the paste before any of that runs. Register with * `addDisposableListener(editor.getDomNode(), EventType.PASTE, ..., true)`. */ export declare function handleTerminalCommandPaste(e: ClipboardEvent, editor: ICodeEditor, prefix: string | undefined, dialogService: IDialogService, storageService: IStorageService): void; export {};