import { CancellationToken } from "../../../../base/common/cancellation.js"; import { Disposable } from "../../../../base/common/lifecycle.js"; import { ICodeEditor } from "../../../../editor/browser/editorBrowser.js"; import { IAccessibilityService } from "../../../../platform/accessibility/common/accessibility.service.js"; import { IHoverService } from "../../../../platform/hover/browser/hover.service.js"; import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; import { INewSessionPromptOption, INewSessionPromptOptionsController, NewSessionPromptOptionsState } from "./newSessionComposerService.js"; interface INewSessionPromptOptionsWidgetOptions { readonly selectOption: (option: INewSessionPromptOption, expectedInput: string, animate: boolean) => Promise; readonly onDidSelectOption: (option: INewSessionPromptOption) => void; readonly onDidClose: () => void; } export declare class NewSessionPromptOptionsWidget extends Disposable { private readonly _container; private readonly _options; private readonly _hoverService; readonly element: HTMLElement; private readonly _optionsContainer; private readonly _renderDisposables; private _buttons; private _inputValue; private _selectedOptionId; private _selecting; private readonly _hoverLifecycleOptions; constructor(_container: HTMLElement, _options: INewSessionPromptOptionsWidgetOptions, _hoverService: IHoverService); /** * Show or hide the options, and report to the stack. Standalone, so a tip * above joins the options rather than the input. */ private _setVisible; setState(state: NewSessionPromptOptionsState | undefined): void; setInputValue(value: string): void; /** Whether focus is inside the rendered options, where re-rendering would move focus to the body. */ hasFocusedOption(): boolean; shouldClearInputForRefresh(): boolean; private _renderLoading; private _renderOptions; private _select; private _updateButtons; } /** * Prompt options above a new-session composer's input: shows the options, * inserts the picked prompt into the input editor (typed out, with its editable * placeholder), and refreshes them through the host's controller. Shared by the * composer inputs so they present prompt options identically. */ export declare class NewSessionPromptOptionsPresenter extends Disposable { private readonly _focusInput; private readonly _instantiationService; private readonly _accessibilityService; private _editor; private readonly _promptTemplatePlaceholder; private readonly _promptOptionsWidget; private readonly _promptOptionsRefresh; private readonly _promptTypingAnimation; private _promptOptionsState; private _promptOptionsController; private _promptOptionsDismissed; private _promptOptionsSelected; constructor(_focusInput: () => void, _instantiationService: IInstantiationService, _accessibilityService: IAccessibilityService); /** * Binds the input editor and renders the options into `container`, before * `insertBefore` when given. State set before this is shown once attached. */ attach(editor: ICodeEditor, container: HTMLElement, insertBefore?: HTMLElement): void; /** Replaces the editable placeholder at the cursor, returning whether one was there. */ replacePlaceholderAtCursor(): boolean; animatePrompt(text: string, durationMs: number, placeholder: string, token: CancellationToken, expectedValue?: string): Promise; private _replacePrompt; showPromptOptions(state: NewSessionPromptOptionsState | undefined): boolean; setPromptOptionsController(controller: INewSessionPromptOptionsController): void; preparePromptOptionsRefresh(): boolean; clearPromptOptions(): void; private _dismissPromptOptions; private _cancelPromptOptionsRefresh; refreshPromptOptions(token?: CancellationToken): Promise; dispose(): void; } export {};