Path: blob/main/src/vscode-dts/vscode.proposed.chatInputNotification.d.ts
13379 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45declare module 'vscode' {67/**8* Severity level of a chat input notification.9*/10export enum ChatInputNotificationSeverity {11/**12* Informational notification (e.g., approaching a usage threshold).13*/14Info = 0,1516/**17* Warning notification (e.g., close to a usage limit).18*/19Warning = 1,2021/**22* Error notification (e.g., quota exhausted).23*/24Error = 2,25}2627/**28* An action button displayed in a chat input notification.29*/30export interface ChatInputNotificationAction {31/**32* The label of the action button.33*/34label: string;3536/**37* The command to execute when the action is clicked.38*/39commandId: string;4041/**42* Optional arguments to pass to the command.43*/44commandArgs?: unknown[];45}4647/**48* A notification banner displayed above the chat input area.49*50* Notifications have a severity level that controls their visual styling51* (info, warning, or error), a message, optional action buttons, and52* configurable dismiss behavior.53*/54export interface ChatInputNotification {55/**56* The unique identifier of this notification.57*/58readonly id: string;5960/**61* The severity of the notification.62*/63severity: ChatInputNotificationSeverity;6465/**66* The title to display. Plain text only. Rendered in bold.67*/68message: string;6970/**71* Optional description text displayed below the title.72* Plain text only.73*/74description: string | undefined;7576/**77* Optional action buttons to display.78*/79actions: ChatInputNotificationAction[];8081/**82* Whether the notification can be dismissed by the user. Defaults to `true`.83*/84dismissible: boolean;8586/**87* Whether the notification should be automatically dismissed when the user88* sends their next chat message. Defaults to `false`.89*/90autoDismissOnMessage: boolean;9192/**93* Shows the notification in the chat input area.94*/95show(): void;9697/**98* Hides the notification from the chat input area.99*/100hide(): void;101102/**103* Dispose and free associated resources.104*/105dispose(): void;106}107108namespace chat {109/**110* Create a new chat input notification.111*112* @param id The unique identifier of the notification.113* @returns A new chat input notification.114*/115export function createInputNotification(id: string): ChatInputNotification;116}117}118119120