import * as dom from "../../../../../../base/browser/dom.js"; import { Disposable } from "../../../../../../base/common/lifecycle.js"; import { ResourceMap } from "../../../../../../base/common/map.js"; import { URI } from "../../../../../../base/common/uri.js"; import { IInstantiationService } from "../../../../../../platform/instantiation/common/instantiation.js"; import { IChatRequestVariableEntry } from "../../../common/attachments/chatVariableEntries.js"; import { IChatContentReference } from "../../../common/chatService/chatService.js"; import { ILanguageModelsService } from "../../../common/languageModels.service.js"; import { IChatImageBase64Data } from "../../attachments/chatAttachmentWidgets.js"; import { IChatAttachmentWidgetRegistry } from "../../attachments/chatAttachmentWidgetRegistry.service.js"; import { IChatImageRevealOrigin } from "../../attachments/chatImageReveal.js"; export interface IChatAttachmentsContentPartOptions { readonly variables: readonly IChatRequestVariableEntry[]; /** The session of the chat that shows the attachments, `undefined` outside a chat session. */ readonly sessionResource: URI | undefined; readonly contentReferences?: ReadonlyArray; readonly modelId?: string; readonly resolvedModelId?: string; readonly domNode?: HTMLElement; readonly limit?: number; readonly showImageInHover?: boolean; /** Render original images directly instead of preparing attachment thumbnails. */ readonly imagePresentation?: "thumbnail" | "inline"; readonly imageReveal?: IChatImageRevealOrigin; readonly imageDimensions?: ResourceMap; readonly imageBase64Data?: ReadonlyMap; } export declare class ChatAttachmentsContentPart extends Disposable { private readonly instantiationService; private readonly languageModelsService; private readonly chatAttachmentWidgetRegistry; private readonly attachedContextDisposables; private readonly _onDidChangeVisibility; private readonly _contextResourceLabels; private _showingAll; private _variables; private readonly sessionResource; private readonly contentReferences; private readonly modelId?; private readonly resolvedModelId?; private readonly limit?; private readonly showImageInHover; private readonly imagePresentation; private readonly imageReveal; private readonly imageDimensions; private readonly imageBase64Data; readonly domNode: HTMLElement | undefined; contextMenuHandler?: (attachment: IChatRequestVariableEntry, event: MouseEvent) => void; constructor(options: IChatAttachmentsContentPartOptions, instantiationService: IInstantiationService, languageModelsService: ILanguageModelsService, chatAttachmentWidgetRegistry: IChatAttachmentWidgetRegistry); /** * Update the variables and re-render the attachments in place. */ updateVariables(variables: readonly IChatRequestVariableEntry[]): void; private initAttachedContext; private getRenderableAttachments; private getVisibleAttachments; private currentModelDoesNotSupportImages; /** * When the total number of image attachments exceeds the model-specific * per-request limit, mark the oldest images (those dropped by the backend) * with {@link OmittedState.ImageLimitExceeded}. */ private markImageLimitExceeded; private getImageLimitForCurrentModel; private getCurrentLanguageModel; private renderShowMoreButton; private renderAttachment; }