import { Event } from "../../../../../../sessions/sessions.web.main.internal.js"; import { IChatInputNotification, IChatInputNotificationSetOptions, IChatInputNotificationContext, IChatInputNotificationBody } from "./chatInputNotificationService.js"; export declare const IChatInputNotificationService: import("../../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; export interface IChatInputNotificationService { readonly _serviceBrand: undefined; readonly onDidChange: Event; /** Fires when a notification is dismissed by the user (via the X button). */ readonly onDidDismiss: Event; /** * Set or update a notification. If a notification with the same ID already * exists, its content is replaced and any previous user dismissal is cleared. * With {@link IChatInputNotificationSetOptions.inPlace}, an existing * notification's content is replaced but it keeps its dismissal and its * place among others of the same severity. */ setNotification(notification: IChatInputNotification, options?: IChatInputNotificationSetOptions): void; /** * Remove a notification entirely (e.g., when the extension disposes it). */ deleteNotification(id: string): void; /** * Ask mounted inputs to re-evaluate what they render, without touching notification or * dismissal state. Use when something a `when` predicate reads has changed. */ refresh(): void; /** Dismisses the rendered notice without dismissing a replacement published under the same id. */ dismissNotification(id: string, notification?: IChatInputNotification): void; /** * Get the single active notification to display. Returns the highest-severity * notification that has not been dismissed. Ties are broken by most-recent insertion. * An optional `filter` can be provided to restrict the set of notifications considered, * so a non-matching higher-priority notification doesn't mask other eligible ones. * Members of a {@link IChatInputNotification.group} are only considered while no * other eligible member of their group has a higher priority. */ getActiveNotification(filter?: (notification: IChatInputNotification) => boolean): IChatInputNotification | undefined; /** * Called when the user sends a chat message. Auto-dismisses the notifications * that have {@link IChatInputNotification.autoDismissOnMessage} set and that * apply to the session the message was sent in, so a message in one session * doesn't hide session-scoped notifications belonging to another. When no * context is given, all such notifications are dismissed. */ handleMessageSent(context?: IChatInputNotificationContext): void; /** * Announce a notification that a chat input is about to render to screen * readers. De-duplicated per notification id across all mounted chat inputs, * so content shown in several widgets (panel, side bar, …) is only spoken * once and session-scoped notifications are only announced when a chat input * in a matching session actually renders them. Passing `undefined` is a no-op. */ announceRendered(notification: IChatInputNotification | undefined, body?: IChatInputNotificationBody): void; }