/** * Transcript presentation for shell task results: a `wait` observation and a `kill` receipt each become one status * line, with the task's output (when it has any) below it. Raw observation envelopes and internal ids never appear. * * Roles follow DESIGN.md: success, error, warning and dim carry the state, `·` separates facts, and only the glyphs * `✓ ✗ ● ○` are used. The status reads the same without color; with `NO_COLOR` set it drops foreground color and * keeps the weight. */ import { type Container } from "@earendil-works/pi-tui"; import type { ToolRenderResultOptions } from "../extensions/types.ts"; import type { CancelReceipt, WaitOutcome } from "../tasks/contracts.js"; import { type TruncationResult } from "./truncate.ts"; /** Output lines shown before a shell result collapses behind the expand hint. */ export declare const SHELL_OUTPUT_PREVIEW_LINES = 5; type ResultContent = Array<{ type: string; text?: string; data?: string; mimeType?: string; }>; /** The output block of a shell result: everything when expanded, otherwise the last few lines and an expand hint. */ export declare function addShellOutputPreview(component: Container, output: string, expanded: boolean): void; export declare function formatTruncationNotice(truncation: TruncationResult): string; export interface ShellWaitResultView { content: ResultContent; details?: { observation?: WaitOutcome; truncation?: TruncationResult; fullOutputPath?: string; }; } /** * Rebuild the row of a `wait` result: status line, output, a dim note when the output was cut short, then the timer. * An error that is not a task failure, or a result without an observation, is left to the generic shell renderer; * the return value says whether this renderer handled the result. */ export declare function rebuildShellWaitResult(component: Container, result: ShellWaitResultView, options: Pick, view: { showImages: boolean; isError: boolean; taskId: string | undefined; timerText: string | undefined; }): boolean; export declare function formatKillCall(args: { id?: unknown; } | undefined): string; /** Rebuild the row of a `kill` result from its receipt, or from the failure text when the call was rejected. */ export declare function rebuildKillResult(component: Container, result: { content: ResultContent; details?: CancelReceipt; }, view: { isError: boolean; taskId: string | undefined; }): void; export {}; //# sourceMappingURL=shell-task-render.d.ts.map