import { AIVariable, AIVariableResolutionRequest, ResolvedAIContextVariable } from '@theia/ai-core'; import { ParsedChatRequestPart } from './parsed-chat-request'; export declare const IMAGE_CONTEXT_VARIABLE: AIVariable; /** * Represents an image context variable. Can be either: * - Pre-processed: Contains base64 data (from clipboard paste) * - Path-based: Contains only wsRelativePath, data is resolved on-demand (from file drop) */ export interface ImageContextVariable { name?: string; wsRelativePath?: string; /** Base64-encoded image data. Optional for path-based references that are resolved on-demand. */ data?: string; /** MIME type of the image. Optional for path-based references that are resolved on-demand. */ mimeType?: string; } /** * A fully resolved image context variable with all data present. */ export interface ResolvedImageContextVariable extends ImageContextVariable { data: string; mimeType: string; } export interface ImageContextVariableRequest extends AIVariableResolutionRequest { variable: typeof IMAGE_CONTEXT_VARIABLE; arg: string; } export declare namespace ImageContextVariable { const name = "name"; const wsRelativePath = "wsRelativePath"; const data = "data"; const mimeType = "mimeType"; function isImageContextRequest(request: object): request is ImageContextVariableRequest; function isResolvedImageContext(resolved: object): resolved is ResolvedAIContextVariable & { arg: string; }; function parseRequest(request: AIVariableResolutionRequest): undefined | ImageContextVariable; function resolve(request: ImageContextVariableRequest): ResolvedAIContextVariable; function parseResolved(resolved: ResolvedAIContextVariable): undefined | ResolvedImageContextVariable; function createRequest(content: ImageContextVariable): ImageContextVariableRequest; function createArgString(args: ImageContextVariable): string; /** * Parse an argument string into an ImageContextVariable. * The variable may be path-based (no data) or pre-processed (with data). */ function parseArg(argString: string): ImageContextVariable; /** * Check if an ImageContextVariable has been fully resolved (has data and mimeType). */ function isResolved(variable: ImageContextVariable): variable is ResolvedImageContextVariable; /** * Create a path-based image request that will be resolved on-demand. */ function createPathBasedRequest(path: string, imageName?: string): ImageContextVariableRequest; /** * Extract all resolved inline image variables from a list of parsed chat request parts. * Parts that fail to parse are silently skipped. */ function extractInlineImages(parts: ParsedChatRequestPart[]): ResolvedImageContextVariable[]; /** * Extract resolved inline image variables from a list of parsed chat request parts, * keyed by the index of the part in the original array. * Parts that fail to parse are silently skipped. */ function extractInlineImagesWithIndices(parts: ParsedChatRequestPart[]): Map; } //# sourceMappingURL=image-context-variable.d.ts.map