import { BaseActionViewItem } from "../../../../../../base/browser/ui/actionbar/actionViewItems.js"; import { IAction } from "../../../../../../base/common/actions.js"; import { Disposable, IDisposable } from "../../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../../base/common/observable.js"; import { URI } from "../../../../../../base/common/uri.js"; import { IModePickerDelegate } from "./modePickerActionItem.js"; import { IModelPickerDelegate } from "./modelPicker/modelPickerActionItem.js"; import { IChatPhoneInputPresenter } from "./chatPhoneInputPresenter.service.js"; export interface IChatPhoneInputSessionContext { readonly providerId: string; readonly sessionId: string; readonly sessionType: string; readonly chatResource: URI; readonly modelId: string | undefined; } export type ChatPhoneInputPresenterRequest = { readonly kind: "delegates"; readonly modeDelegate: IModePickerDelegate; readonly modelDelegate: IModelPickerDelegate; } | { readonly kind: "session"; readonly getSessionContext: () => IChatPhoneInputSessionContext | undefined; readonly selectModel: (modelIdentifier: string) => boolean; }; /** * Implementation of the phone-only chat-input picker presenter, registered * by the agents-window (sessions) layer. Stays in `vs/workbench` as an * interface so the workbench chat input can compile and run with no * sessions dependency; the default singleton is a no-op. */ export interface IChatPhonePresenterImpl { /** * Whether the phone presenter is currently active. Workbench code * consults this to decide between desktop popups and the bottom-sheet * presentation. Drives a `_updateToolbar()` refresh on flips. */ readonly enabled: IObservable; /** * Show a unified bottom sheet listing both Mode and Model rows for the * given chat input pickers. Resolves once the user dismisses the sheet. * * The request identifies whether state comes from workbench picker delegates * or from an input-scoped Sessions context. */ showCombinedModeAndModelSheet(target: HTMLElement, request: ChatPhoneInputPresenterRequest): Promise; } export declare class ChatPhoneInputPresenterService extends Disposable implements IChatPhoneInputPresenter { readonly _serviceBrand: undefined; private readonly _impl; readonly enabled: IObservable; showCombinedModeAndModelSheet(target: HTMLElement, request: ChatPhoneInputPresenterRequest): Promise; setImpl(impl: IChatPhonePresenterImpl): IDisposable; } /** * Phone-only action view item used in place of the desktop Model and Mode * pickers. Renders one compact button whose label shows the current model name * with the current mode's icon as a leading marker; tapping it opens the * unified bottom sheet through the {@link IChatPhoneInputPresenter}. * * Visually mirrors the button used in the empty new-chat input (see * `MobileChatInputConfigPicker` in `vs/sessions`) so the two chat-input * surfaces present a consistent mobile experience. */ export declare class MobileChatInputCombinedPickerActionItem extends BaseActionViewItem { private readonly _modeDelegate; private readonly _modelDelegate; private readonly _presenter; private readonly _renderDisposables; private _triggerElement; constructor(action: IAction, _modeDelegate: IModePickerDelegate, _modelDelegate: IModelPickerDelegate, _presenter: IChatPhoneInputPresenter); render(container: HTMLElement): void; private _updateTrigger; /** Belt-and-braces: keep the action's `run()` suppressed even if `super.render` is reintroduced. */ onClick(): void; private _showSheet; }