/** * Reading one `read_image` call into what the row draws. * * The image is not something this plugin infers or reconstructs: the tool * result already carries an `image` content block whose `attachment` is the * durable reference the attachment service committed, which is the same * reference a user-uploaded image rides. So the model layer is a projection, * not a parser — it finds that block and reports the call's state around it. */ import type { ImageAttachmentRef } from '@deepseek-ai/dsh-attachment'; import type { ToolCallBlock } from '@deepseek-ai/dsh-client-runtime/client'; /** Lifecycle of one `read_image` call, as the row renders it. */ export type ReadImageState = 'running' | 'ok' | 'error' | 'stopped'; /** Everything the row draws, derived once from the frozen call slice. */ export interface ReadImageModel { /** Call lifecycle; only `ok` can carry an image. */ state: ReadImageState; /** The path the call asked for, for the summary line. */ path: string; /** * The durable image this call committed; absent while running, on failure, * and on a settled result that carried no image block (a Host that answered * the call differently than this plugin expects — the row degrades to its * summary rather than inventing a picture). */ image: ImageAttachmentRef | undefined; /** First line of the failure text on an error row; null otherwise. */ errorSummary: string | null; } /** * Strip the workspace root from a workspace-rooted path (display only). * @param text - the path to shorten. * @param cwd - session workspace root; absent leaves the path unchanged. * @returns the path relative to the workspace root, or unchanged. */ export declare function relativizeToCwd(text: string, cwd: string | undefined): string; /** * Project one `read_image` call into its row model. * @param block - the running call or settled result off the snapshot caches. * @param cwd - session workspace root; a rooted path displays relative to it. * @returns the row model. */ export declare function readImageModel(block: ToolCallBlock, cwd?: string): ReadImageModel; //# sourceMappingURL=read-image-model.d.ts.map