import { IStringDictionary } from "../../../../../../base/common/collections.js"; import { Disposable } from "../../../../../../base/common/lifecycle.js"; import { IObservable } from "../../../../../../base/common/observable.js"; import { URI } from "../../../../../../base/common/uri.js"; import { IAccessibilityService } from "../../../../../../platform/accessibility/common/accessibility.service.js"; import { ICommandService } from "../../../../../../platform/commands/common/commands.service.js"; import { IHoverService } from "../../../../../../platform/hover/browser/hover.service.js"; import { ILogService } from "../../../../../../platform/log/common/log.service.js"; import { IMarkdownRendererService } from "../../../../../../platform/markdown/browser/markdownRenderer.service.js"; import { ITelemetryService } from "../../../../../../platform/telemetry/common/telemetry.service.js"; import { IChatInputNoticeFocusTarget } from "./chatInputNoticeHost.js"; import { IChatInputNotificationModelState } from "./chatInputNotificationService.js"; import { IChatInputNotificationService } from "./chatInputNotificationService.service.js"; /** Input-local model state and picker operations. */ export interface IChatInputNotificationModelSelection { readonly state: IObservable; readonly openPicker: () => void; readonly selectModel: (modelIdentifier: string) => boolean; /** Applies model configuration such as a thinking level, scoped to this input. */ readonly applyModelConfiguration?: (modelIdentifier: string, values: IStringDictionary) => Promise; } /** Input-local capabilities used to filter and execute semantic notification actions. */ export interface IChatInputNotificationDelegate { readonly hostVisible?: IObservable; readonly inputUri?: URI; readonly modelTargetChatSessionType?: IObservable; readonly sessionResource?: IObservable; readonly deferredNotificationsEnabled?: IObservable; /** Whether this input is a transient surface (inline, terminal, quick chat, chat input window). */ readonly isTransientChat?: IObservable; /** Whether the session this input is bound to already has a request. */ readonly sessionStarted?: IObservable; readonly modelSelection?: IChatInputNotificationModelSelection; /** * Reports whether a notification is rendered. `focusTarget` is the widget * itself, so a host can route notice-focus commands into it while it shows. */ readonly onDidChangeVisibility?: (visible: boolean, focusTarget: IChatInputNoticeFocusTarget) => void; /** * Hands focus back to the input. Called when a notification that had keyboard * focus goes away, so focus is not stranded on ``. */ readonly focusInput?: () => void; } /** * Widget that renders a single notification banner above the chat input area. * Subscribes to {@link IChatInputNotificationService} and shows the highest-severity * active notification with severity-colored borders, action buttons, and a dismiss button. */ export declare class ChatInputNotificationWidget extends Disposable implements IChatInputNoticeFocusTarget { private readonly _delegate; private readonly _notificationService; private readonly _commandService; private readonly _telemetryService; private readonly _markdownRendererService; private readonly _hoverService; private readonly _logService; private readonly _accessibilityService; private readonly _notice; get domNode(): HTMLElement; private readonly _contentDisposables; private _lastShownTelemetryData; private _modelTargetChatSessionType; private _sessionResource; private _deferredNotificationsEnabled; private _sessionStarted; private _modelState; private _isTransientChat; private _lastAnnouncementSignature; private _visible; private _hostVisible; private _currentNotification; private _rendered; private _slot; constructor(_delegate: IChatInputNotificationDelegate | undefined, _notificationService: IChatInputNotificationService, _commandService: ICommandService, _telemetryService: ITelemetryService, _markdownRendererService: IMarkdownRendererService, _hoverService: IHoverService, _logService: ILogService, _accessibilityService: IAccessibilityService); private _render; private _announce; /** Keeps the notification on screen when it is still the one to show, updating it in place; rebuilding would move keyboard focus off an action such as Pause. */ private _updateInPlace; /** What a rendered notification looks like apart from what changes in place: its message, progress, and action labels and states. */ private _getLayoutKey; private _updateButtons; /** Labels the button of `action`, named after the notification's `title`, and enables it unless the action is disabled. */ private _updateButton; /** Shows `progress` on the standard progress bar: indeterminate without a percentage, else its fill, switching in place. */ private _updateProgress; /** Shows the in-progress indicator of an active agent session, as the Agent Sessions view does; created once per rendered notification so updates keep it running. */ private _renderBusyIcon; private _setVisible; hasFocus(): boolean; /** * Add the notification to its slot and report what the slot is showing. * * The widget is built detached and renders in its constructor, so an already * active notification has no slot to report to at that point. Owners add it * through here so the slot cannot end up marked empty while it has content. */ attachTo(slot: HTMLElement): void; focus(): void; private _resolveBody; private _getContext; private _renderNotification; private _supportsAction; private _executeAction; private _resolveModel; private _matchesModel; private _switchToModel; /** Key names are model-specific (`thinkingLevel`, `reasoningEffort`, ...), so a key meant for another model is logged rather than stored. */ private _applyModelConfiguration; private _openModelPicker; private _logError; private _executeCommandAction; private _handleShown; private _getTelemetryData; }