import * as event from "@codingame/monaco-vscode-api/vscode/vs/base/common/event"; import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { IChatRequestVariableEntry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/attachments/chatVariableEntries"; import { IChatAttachmentWidgetRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/attachments/chatAttachmentWidgetRegistry.service"; /** * Interface for a contributed attachment widget instance. */ export interface IChatAttachmentWidgetInstance extends IDisposable { readonly element: HTMLElement; readonly onDidDelete: event.Event; readonly onDidOpen: event.Event; /** Optional label element, used for applying warning styles on omitted attachments. */ readonly label?: { readonly element: HTMLElement; }; } /** * Factory function type for creating attachment widgets. */ export type ChatAttachmentWidgetFactory = (attachment: IChatRequestVariableEntry, options: { shouldFocusClearButton: boolean; supportsDeletion: boolean; }, container: HTMLElement) => IChatAttachmentWidgetInstance; export declare class ChatAttachmentWidgetRegistry implements IChatAttachmentWidgetRegistry { readonly _serviceBrand: undefined; private readonly _factories; registerFactory(kind: string, factory: ChatAttachmentWidgetFactory): IDisposable; createWidget(attachment: IChatRequestVariableEntry, options: { shouldFocusClearButton: boolean; supportsDeletion: boolean; }, container: HTMLElement): IChatAttachmentWidgetInstance | undefined; }