import type { ImageContent, TextContent } from "@bastani/pi-ai/compat"; import type { ThemeColor } from "../../modes/interactive/theme/theme.js"; import type { ToolRenderContext } from "../extensions/tool-types.ts"; export declare function shortenPath(path: unknown): string; export declare function linkPath(styledText: string, rawPath: string, cwd: string): string; export declare function renderToolPath(rawPath: string | null, theme: { fg: (name: ThemeColor, text: string) => string; }, cwd: string, options?: { emptyFallback?: string; }): string; export declare function str(value: unknown): string | null; /** Format finite numbers or numeric strings as a read line range, omitting malformed ranges. */ export declare function formatReadLineRange(offset: unknown, limit: unknown): string; export declare function replaceTabs(text: string): string; export declare function normalizeDisplayText(text: string): string; export declare function getTextOutput(result: { content: Array<{ type: string; text?: string; data?: string; mimeType?: string; }>; } | undefined, showImages: boolean): string; export type ToolRenderResultLike = { content: (TextContent | ImageContent)[]; details: TDetails; }; export declare function formatToolCallWithArgs(title: string, args: unknown, theme: { fg: (name: ThemeColor, text: string) => string; bold: (text: string) => string; }, expanded: boolean): string; /** Renderer state of {@link startToolTimer} and {@link toolTimerText}, kept in `ToolRenderContext.state`. */ export interface ToolTimerState { startedAt?: number; endedAt?: number; interval?: ReturnType; } /** Start the row's clock once execution starts. Call from `renderCall`. */ export declare function startToolTimer(context: ToolRenderContext): void; /** * The row's timing line, from `renderResult`: `Elapsed 4.2s` while the result is partial, redrawn * every second, and ` 4.2s` once it is final. Undefined when the row has no start time * and no recorded duration. */ export declare function toolTimerText(context: ToolRenderContext, isPartial: boolean, finalLabel?: string): string | undefined; export declare function invalidArgText(theme: { fg: (name: ThemeColor, text: string) => string; }): string; //# sourceMappingURL=render-utils.d.ts.map