/** * `@fzhiyu/dsh-image-view` browser half. * * One registration into the Tool-owned keyed view slot, under the `read_image` * key. A keyed hit REPLACES the generic row rather than sitting beside it, so * this plugin owns how that one tool renders and changes nothing else: every * other tool row, and the whole rest of the conversation, is untouched. * * The row is drawn from the tool result the Host already logged — the image * block is durable session history, not a live side channel — so a reloaded * page and a scrolled-back turn show the image exactly as the turn that * produced it did. */ import type { ClientContext, SessionId } from '@deepseek-ai/dsh-client-runtime/client'; import type { ToolCallViewProps } from '@deepseek-ai/dsh-client-ui-tool/client'; import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'; import { SessionImageCache } from './image-loader.ts'; import { type ImageViewKey } from './locales.ts'; export { ReadImageRow } from './ReadImageRow.tsx'; export type { ReadImageLabels, ReadImageRowProps } from './ReadImageRow.tsx'; export { readImageModel, relativizeToCwd } from './read-image-model.ts'; export type { ReadImageModel, ReadImageState } from './read-image-model.ts'; export { SessionImageCache } from './image-loader.ts'; export type { ImageLoader } from './image-loader.ts'; export { en, NS, zh } from './locales.ts'; export type { ImageViewKey } from './locales.ts'; declare module '@deepseek-ai/dsh-client-ui-slots' { interface LocaleNamespaceMap { /** This plugin's own dictionary; see locales.ts for why it is not borrowed. */ 'image-view': ImageViewKey; } } /** What the view needs from the plugin, beyond the framework's own share. */ export interface ImageViewInjected { /** Resolves one durable image under the rendering session's authorization. */ readonly loadImage: (sessionId: SessionId) => (attachment: Parameters[1]) => Promise; } /** Full props of the registered view. */ export type ReadImageViewProps = ToolCallViewProps & ImageViewInjected & PropsLocale<'image-view'>; /** * The keyed `read_image` view. * @param props - the framework's call share, the loader, and the locale seat. * @returns the row for this call. */ export declare function ReadImageToolView({ block, cwd, openFile, sessionId, loadImage, t, }: ReadImageViewProps): import("react").JSX.Element; /** Required services: the slot registry, the dictionary registry, and sessions. */ export declare const inject: string[]; /** * Mount the `read_image` view. * @param ctx - the client context. */ export declare function apply(ctx: ClientContext): void; /** The plugin as a registrant, for a host composing it directly. */ export declare const imageViewPlugin: { name: string; inject: string[]; apply: typeof apply; }; //# sourceMappingURL=index.d.ts.map