/** * Pictures a prompt refers to, sent as pictures rather than as filenames. * * Naming a screenshot in a prompt did nothing useful: the model received the path, could not open * it — a PNG is not text — and answered about a file it had never seen. Anyone working from * screenshots, which is how most people report what is wrong with something, was effectively * describing an image to a model that could not look at it. */ export declare const MAX_IMAGE_BYTES: number; /** More than this in one prompt is a directory, not an illustration. */ export declare const MAX_IMAGES = 4; /** The media type for a path, or null if it is not an image we can send. */ export declare function imageMime(filePath: string): string | null; export interface AttachedImage { path: string; dataUrl: string; bytes: number; } export interface ImageProblem { path: string; reason: string; } /** * Reads images for sending, and says which ones it could not. * * A failure here is never fatal: an unreadable screenshot should cost the picture, not the * request. The prompt still goes, and what was dropped is said out loud rather than left for the * user to infer from an answer that ignores what they were pointing at. */ export declare function loadImages(paths: readonly string[], limit?: number): Promise<{ images: AttachedImage[]; problems: ImageProblem[]; }>; /** A content part as the chat API expects it. */ export type ContentPart = { type: 'text'; text: string; } | { type: 'image_url'; image_url: { url: string; }; }; /** * The user message, as text alone or as text plus pictures. * * Plain text stays a plain string rather than a one-element array: some providers accept only the * string form, and there is no reason to make every text-only prompt take the riskier shape. */ export declare function buildUserContent(text: string, images: readonly AttachedImage[]): string | ContentPart[]; /** * Whether a provider error is about the pictures rather than the request. * * Worth telling apart, because the recovery differs: a model that cannot see should be asked * again without the images, while anything else should be reported as what it is. */ export declare function looksLikeVisionUnsupported(err: unknown): boolean; /** What the user is told when the pictures could not go. */ export declare function visionUnsupportedNotice(model: string, count: number): string; //# sourceMappingURL=images.d.ts.map