+
- {open ?
{row.detail}
: null}
-
- );
-}
-
-// Never folded into a summary line (DESIGN.md §12.3: chips, not
-// collapsibles) — no group-level trigger, no count.
-export function ToolActivityGroup({ rows }: { readonly rows: readonly ToolActivityRow[] }) {
- if (rows.length === 0) return null;
- return (
-
- {rows.map((row) => (
-
- ))}
+ {open ?
{row.detail}
: null}
);
}
// Plus the two things that only exist while a turn is open: thinking and
// a retried request.
-export function LiveToolActivity({
+export function ToolTrace({
rows,
- thinking,
- retryCount,
+ live = false,
+ thinking = false,
+ retryCount = 0,
}: {
readonly rows: readonly ToolActivityRow[];
- readonly thinking: boolean;
- readonly retryCount: number;
+ readonly live?: boolean;
+ readonly thinking?: boolean;
+ readonly retryCount?: number;
}) {
+ const [open, setOpen] = useState(false);
if (rows.length === 0 && !thinking && retryCount === 0) return null;
return (
-
- {rows.map((row) => (
-
- ))}
- {thinking ? (
-
- {CHAT_STRINGS.turnActivityThinking}
-
- ) : null}
- {retryCount > 0 ? (
-
- {CHAT_STRINGS.turnActivityRetry(retryCount)}
+
+
+ {open ? (
+
+ {rows.map((row) => (
+
+ ))}
+ {thinking ? (
+
+ {CHAT_STRINGS.turnActivityThinking}
+
+ ) : null}
+ {retryCount > 0 ? (
+
+ {CHAT_STRINGS.turnActivityRetry(retryCount)}
+
+ ) : null}
) : null}
diff --git a/apps/web/src/chat/turn-activity.tsx b/apps/web/src/chat/turn-activity.tsx
index c1c5dde64..fa3e433cb 100644
--- a/apps/web/src/chat/turn-activity.tsx
+++ b/apps/web/src/chat/turn-activity.tsx
@@ -10,7 +10,7 @@ import {
toolActivityGlyph,
type ToolActivityRow,
} from "./tool-activity";
-import { LiveToolActivity } from "./tool-activity-view";
+import { ToolTrace } from "./tool-activity-view";
export type ToolCallActivity = {
readonly callId: string;
@@ -362,7 +362,8 @@ export function TurnActivityStrip({ activity }: { readonly activity: TurnActivit
if (activity === null) return null;
return (
-