import { a as ToolPart } from './parts-dj7AcUg0.js'; import { ReactNode } from 'react'; /** * Variant-specific rendering instructions for tool output. * Maps directly to specialised preview components. */ type DisplayVariant = "command" | "write-file" | "read-file" | "diff" | "question" | "web-search" | "grep" | "glob" | "default"; /** * Custom renderer for tool details. Return a ReactNode to override the * default ExpandedToolDetail, or null to fall back to the built-in renderer. */ type CustomToolRenderer = (part: ToolPart) => ReactNode | null; /** * Visual metadata for a tool invocation — computed from the tool name, * input, and output by `getToolDisplayMetadata()`. */ interface ToolDisplayMetadata { title: string; description?: string; inputTitle?: string; outputTitle?: string; inputLanguage?: string; outputLanguage?: string; hasDiffOutput?: boolean; diffFilePath?: string; displayVariant?: DisplayVariant; commandSnippet?: string; targetPath?: string; } export type { CustomToolRenderer as C, DisplayVariant as D, ToolDisplayMetadata as T };