/**
 * Shared types and utilities for tool execution rendering.
 *
 * Defines the content block, result, and preview state types used across
 * the tool execution pipeline, plus string coercion and path helpers.
 */
import type { EditDiffError, EditDiffResult } from '../../../app/tools/edit-diff.js';
export interface ToolExecutionOptions {
    showImages?: boolean;
}
export interface ToolExecutionContentBlock {
    type: string;
    text?: string;
    data?: string;
    mimeType?: string;
}
export interface ToolExecutionResult {
    content: ToolExecutionContentBlock[];
    isError: boolean;
    details?: any;
}
/** Cached syntax highlighting state for the write tool's streaming content preview. */
export type WriteHighlightCache = {
    rawPath: string | null;
    lang: string;
    rawContent: string;
    normalizedLines: string[];
    highlightedLines: string[];
};
/** Transient preview state computed during tool streaming (write highlights, edit diffs). */
export interface ToolExecutionPreviewState {
    writeHighlightCache?: WriteHighlightCache;
    editDiffPreview?: EditDiffResult | EditDiffError;
    firstChangedLine?: number;
}
/** Coerce a tool argument to string. Returns null for non-string/non-null values (invalid). */
export declare function coerceToolString(value: unknown): string | null;
/** Replace tabs with spaces for consistent terminal rendering. */
export declare function normalizeToolText(text: string): string;
/** Replace the user's home directory prefix with ~ for display. */
export declare function shortenHomePath(path: string): string;
//# sourceMappingURL=tool-execution-types.d.ts.map