Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): collapse thoughts within tool groups #12302

Mergedmaria-rcksmerged 2 commits intomain fromrefs/pull/12302/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 43 additions and 23 deletions.

x
0 of 1 viewed, 1 left
43 additions and 23 deletionsapps/web/src/components/chat/MessagesTimeline.tsxModified
View file
@@ -2641,6 +2641,7 @@
details.push(
<ReasoningTraceBlock
key={entry.id}
+ anchorKey={row.id}
messages={messages}
live={row.active && index === row.entries.length - 1}
showHeader={work.length > 0}
@@ -2667,7 +2668,7 @@
shimmer={thinking}
</button>
- {row.expanded ? <div className="mt-2 space-y-2">{details}</div> : null}
+ {row.expanded ? <div className="mt-2">{details}</div> : null}
</div>
@@ -2685,15 +2686,16 @@
- * Thinking inside an expanded activity group: the trace is already one click
- * deep, so the text renders under its "Thought" header without another toggle.
+ * Thinking inside a tool group has its own disclosure, preserved across recycling.
* A group whose row already reads "Thought" (no visible tool) skips the header.
function ReasoningTraceBlock({
+ anchorKey,