import { type ReactNode } from "react"; import { BUILT_IN_TURN_SUMMARY_FACET_IDS, formatElapsed, type TurnSummaryFacetConfiguration, type TurnSummaryStatus } from "./turn-summary-model.js"; import type { ActivityItem, TurnOutcome } from "./types.js"; export { BUILT_IN_TURN_SUMMARY_FACET_IDS, formatElapsed }; export type { BuiltInTurnSummaryFacetId, TurnSummaryContext, TurnSummaryFacet, TurnSummaryFacetConfiguration, TurnSummaryFacetResult, TurnSummaryOptions, TurnSummaryStatus, } from "./turn-summary-model.js"; export type { TurnOutcome } from "./types.js"; /** * True while settle chrome is active (open beat, slow collapse, or the short * cancel-close latch). Nested cluster chips stay mounted and forced OPEN for * this window so the body keeps a stable height — never flat-map to bare * rails, and never remount closed nested chips mid-collapse (that yanked). */ export declare function useTurnSettleOpen(): boolean; export type TurnSummaryProps = { /** Reports the disclosure's actual open state on mount and on every change. */ onOpenStateChange?: ((open: boolean) => void) | undefined; /** The activity items in the turn (used only to compute the facet counts). */ items: ActivityItem[]; /** * The settled verdict — or absent for a completed CLUSTER of a still-running * turn, which folds neutrally. Only unfinished activity inside this summary * animates; the parent turn may still be composing a response elsewhere. */ outcome?: TurnOutcome | undefined; /** A short failure reason shown inline on a failed chip (never hidden). */ failureText?: string | undefined; /** Elapsed turn duration; shown as a trailing facet when at least 1s. */ durationMs?: number | undefined; /** Start expanded. */ defaultOpen?: boolean | undefined; liveHeader?: ReactNode; /** * A nested fold — a cluster or sub-turn INSIDE an already-expanded turn. It * drops the bordered/filled chip and renders as a plain disclosure node on the * parent's rail (chevron + glyph + facets), so expanding a turn reveals a thread * of nodes, never a stack of boxes-in-boxes. The top-level fold stays a chip. */ bare?: boolean | undefined; /** Per-instance facet customization. Omit to preserve the built-in summary exactly. */ facets?: TurnSummaryFacetConfiguration | undefined; /** * Settle choreography: this fold replaced rows the reader was just watching * live. Instead of yanking them behind a chip in one frame, the fold mounts * OPEN with the summary chip easing in above the still-visible rows, holds a * short beat so the reader registers the settle, then glides closed. Any * user interaction during the beat cancels the auto-collapse. Captured at * mount; ignored when the fold starts expanded (e.g. a failed turn). */ settleFold?: boolean | undefined; /** * Durable identity (timeline group id) for cross-remount fold memory. When * an ancestor provides a {@link FoldMemoryProvider} map, reaching a resting * state is recorded under this key: "closed" when the settle choreography * completes its collapse or the reader closes the chip, "open" when the * reader expands it. A later remount under the same key restores that * resting state and never replays the open settle beat — the activity→turn * wrap and the nested force-open during settle chrome must not re-expand a * fold that already settled closed. */ foldKey?: string | undefined; /** * When set, a hover/focus copy control sits on the chip row (outside the * disclosure trigger) so the reader can copy the turn's assistant prose * without toggling the fold. */ copyText?: string | undefined; /** Adjacent compaction landmark count for the secondary chip facet. */ contextCompactionCount?: number | undefined; /** * Exchange status line (compact progress presentation). Replaces the state * marker and the duration facet; a settled `worked` row reads as a separator. */ status?: TurnSummaryStatus | undefined; /** * False when the fold has nothing to reveal: the row renders without a * chevron and is not a disclosure control. Defaults to true. */ expandable?: boolean | undefined; /** The turn has steps that are not loaded yet (opening the row reads them). */ unloadedSteps?: boolean | undefined; /** The rendered activity rail revealed on expand. */ children: ReactNode; }; export declare function TurnSummary({ items, outcome, failureText, durationMs, defaultOpen, liveHeader, bare, facets: facetConfiguration, settleFold, foldKey, copyText, contextCompactionCount, status, expandable, unloadedSteps, onOpenStateChange, children, }: TurnSummaryProps): import("react").JSX.Element;