import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { ICommandService } from "@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service"; import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service"; import { IChatRequestViewModel, IChatResponseViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/model/chatViewModel"; import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service"; import { IChatImageCarouselService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatImageCarouselService.service"; export interface ICarouselImage { readonly id: string; readonly name: string; readonly mimeType: string; readonly data: Uint8Array; readonly caption?: string; } export interface ICarouselSection { readonly title: string; readonly images: ICarouselImage[]; } export interface ICarouselCollectionArgs { readonly collection: { readonly id: string; readonly title: string; readonly sections: ICarouselSection[]; }; readonly startIndex: number; } export interface ICarouselSingleImageArgs { readonly name: string; readonly mimeType: string; readonly data: Uint8Array; readonly title: string; } /** * Collects all carousel image sections from chat items. * Each request/response pair with images becomes one section containing * user attachment images, tool invocation images, and inline reference images. */ export declare function collectCarouselSections(items: (IChatRequestViewModel | IChatResponseViewModel)[], readFile: (uri: URI) => Promise): Promise; /** * Finds the global index of the clicked image across all carousel sections. * Tries URI string match, then parsed URI equality, then data buffer equality. */ export declare function findClickedImageIndex(sections: ICarouselSection[], resource: URI, data?: Uint8Array): number; /** * Builds the collection arguments for the carousel command. */ export declare function buildCollectionArgs(sections: ICarouselSection[], clickedGlobalIndex: number, sessionResource: URI): ICarouselCollectionArgs; /** * Builds the single-image arguments for the carousel command. */ export declare function buildSingleImageArgs(resource: URI, data: Uint8Array): ICarouselSingleImageArgs; export declare class ChatImageCarouselService implements IChatImageCarouselService { private readonly chatWidgetService; private readonly commandService; private readonly fileService; readonly _serviceBrand: undefined; constructor(chatWidgetService: IChatWidgetService, commandService: ICommandService, fileService: IFileService); openCarouselAtResource(resource: URI, data?: Uint8Array): Promise; private openSingleImage; }