import { type ReactNode } from "react"; import type { ToolCallTruncation, ToolOutputPreview } from "./types.js"; /** * Marks a tool row whose output is a bounded preview. The row's disclosure * reads the exact output when it opens and shows it once it lands; until then * the body says it is loading, and a failed read says it is a preview. */ export declare function ToolOutputPreviewProvider({ value, children, }: { value: ToolOutputPreview | null; children: ReactNode; }): import("react").JSX.Element; /** The row's output preview, when its output is not exact. */ export declare function useToolOutputPreview(): ToolOutputPreview | null; /** * A subtle settle signal — see the CHIP DOCTRINE above. The closed tone set. * `"interrupted"` is a calm neutral tone for cancelled items — no dot, same * quiet weight as `"muted"`, but semantically distinct from metadata. */ export type DisclosureChip = { tone: "ok" | "bad" | "muted" | "interrupted"; text: string; }; export declare function ToolCallTruncationProvider({ value, children, }: { value: ToolCallTruncation | null; children: ReactNode; }): import("react").JSX.Element; export type ActivityDisclosureProps = { /** Override the rolling preview; null keeps rapidly streaming details out of the header. */ compactPreview?: ReactNode; icon: ReactNode; /** Icon tint. Defaults to the muted foreground; renderers pass accent/failed. */ iconTone?: "accent" | "failed" | "running" | "muted" | undefined; title: ReactNode; /** Render the title in the mono face (commands, paths). */ titleMono?: boolean | undefined; /** Shimmer the title while the tool is in-flight. */ running?: boolean | undefined; /** * Quiet single-line secondary text (truncated). It is detail-on-demand: hidden * when a media preview is set, AND hidden once the row is expanded (the body * then owns the detail), so a stat/path never appears twice at once. */ preview?: ReactNode | undefined; /** A small inline media preview (a screenshot thumbnail) shown in place of `preview`. */ media?: ReactNode | undefined; /** At most one quiet settle chip, right-aligned to the gutter. */ chip?: DisclosureChip | undefined; /** * When true the row carries the standard failure affordance: the icon is tinted * red and a "failed" bad-chip appears in the right gutter (unless an explicit * `chip` is already supplied — the caller's chip wins). Output is still visible * on expand; this is a quiet status signal, not a blocking banner. * * Renderers should pass `failed={item.status === "failed"}` on their settled * (non-running) paths so any tool with a failed status shows a consistent * affordance without each renderer having to duplicate the logic. */ failed?: boolean | undefined; /** * When true the row carries a calm "interrupted" affordance: the icon stays * muted (no red) and a quiet "interrupted" chip appears in the right gutter * (unless an explicit `chip` is already supplied — the caller's chip wins). * This is the cancelled-status analogue of `failed`, but deliberately calm * and neutral — it is NOT an error; the user chose to stop. * * Renderers should pass `cancelled={item.status === "cancelled"}` so any * in-flight item that was interrupted on turn.cancelled reads consistently. * `cancelled` is ignored when `failed` is also true (failure takes precedence). */ cancelled?: boolean | undefined; /** When false the row is a static line (no expand affordance). */ expandable?: boolean | undefined; /** Seed this individual disclosure open; user interaction still owns it afterwards. */ defaultOpen?: boolean | undefined; children?: ReactNode | undefined; }; /** * The one disclosure row shape every activity row reuses (tool calls, reasoning, * sandbox ops): a chevron, a tinted icon, a title, an optional muted preview or * inline media, and at most one right-gutter settle chip. Compact by default; * the body mounts only when expanded. */ export declare const CompactActivityContext: import("react").Context; export declare function ActivityDisclosure({ icon, iconTone: iconToneProp, title, titleMono, running, preview, compactPreview, media, chip: chipProp, failed, cancelled, expandable, defaultOpen, children, }: ActivityDisclosureProps): import("react").JSX.Element; type TermBlockProps = Parameters[0]; /** Terminal output under a tool row; plain tool details never show it. */ export declare function TermBlock(props: TermBlockProps): import("react").JSX.Element | null; declare function TermBlockView({ command, workdir, output, live, tailLines, failed, }: { /** * The command shown in the prompt header. Pass `null` when the row title * already carries it (e.g. an exec row titled `$ cmd`): the header then drops * the command — and the whole prompt line if there is no workdir either — so * the command never reads twice, stacked, above the output. */ command: string | null; workdir?: string | null | undefined; /** The FULL output. TermBlock owns the tail/full slicing internally. */ output: string; live?: boolean | undefined; /** A non-zero exit / failed call — tints the left accent red (the one hue). */ failed?: boolean | undefined; /** * When the output exceeds the tail window, only the last `tailLines` are shown * with a "show full output" toggle. The component holds the full text, so the * toggle reveals the rest (never a dead affordance). Defaults to 12. */ tailLines?: number | undefined; }): import("react").JSX.Element; export declare function PayloadBlock({ label, value, failed, }: { label: string; value: unknown; failed?: boolean | undefined; }): import("react").JSX.Element | null; /** A quiet inline note inside an expanded body (lost output, empty frame, …). */ export declare function BodyNote({ children, tone, }: { children: ReactNode; tone?: "error" | "muted" | undefined; }): import("react").JSX.Element; /** * A loading screenshot placeholder. A faint camera glyph over a shimmering box, * so a still frame of the running state reads unambiguously as "capturing" — not * a broken thumbnail. */ export declare function MediaSkeleton(): import("react").JSX.Element; /** A standardized "tool ran, produced no image" placeholder in the media slot. */ export declare function MediaEmpty(): import("react").JSX.Element; /** * A small inline screenshot thumbnail that opens the app lightbox on click. * * Requires a `LightboxProvider` ancestor for the click-to-expand affordance. * Outside one it degrades to a plain, non-interactive image — never a dead * "Expand" button that announces an action it cannot perform. */ export declare function Thumbnail({ src, caption, alt, expandLabel: expandLabelProp, lightboxLabel: lightboxLabelProp, downloadFilename, }: { src: string; caption?: string | undefined; alt?: string; expandLabel?: string | undefined; lightboxLabel?: string | undefined; downloadFilename?: string | undefined; }): import("react").JSX.Element; /** * The expanded screenshot inside a tool body: a contained, clickable preview * (opens the lightbox) with a quiet caption. Constrained height + object-contain * so it never breaks the row layout. Like {@link Thumbnail}, it degrades to a * plain image outside a `LightboxProvider`. */ export declare function ScreenshotFigure({ src, caption, showCaption, alt, expandLabel: expandLabelProp, lightboxLabel: lightboxLabelProp, downloadFilename, }: { src: string; caption?: string | undefined; /** Off when the row above already says the same; the lightbox keeps it. */ showCaption?: boolean | undefined; alt?: string; expandLabel?: string | undefined; lightboxLabel?: string | undefined; downloadFilename?: string | undefined; }): import("react").JSX.Element; export {};