feat(agents,backends,conversations,frontends,ui): progress thinking is told apart by its agent, raycast reasoning stays collapsed, read_conversation keeps progress

This commit is contained in:
hh committed 2026-09-22 20:51:23 +02:00
1 parent 13873f857b
commit 120985deab
18 files changed
+374 -110

No files matched your search

+1
View File
@@ -79,6 +79,7 @@ export interface ConversationInfo extends ConversationSummary {
parent: string | null;
question: PendingQuestion | null;
queue: QueueItem[];
thinking_is_progress?: boolean;
turn: TurnSnapshot | null;
}
+4 -1
View File
@@ -233,8 +233,11 @@ export class ActivityModel {
}
if (sdk.type === "content_block_delta" && parent === null) {
const delta = sdk.delta as Record<string, unknown> | undefined;
const progress = this.conversation?.thinking_is_progress === true;
const text =
delta?.type === "thinking_delta" ? delta.thinking : delta?.text;
delta?.type === "thinking_delta" && progress
? delta.thinking
: delta?.text;
if (typeof text === "string" && text) {
turn.text = joinText(turn.text, text, turn.paused);
turn.paused = false;
+5
View File
@@ -193,6 +193,9 @@
if (typeof message.content === "string") {
return [{ text: message.content, type: "text" }];
}
if (!model.conversation?.thinking_is_progress) {
return message.content;
}
return message.content.flatMap((block) => {
if (block.type !== "thinking") {
return [block];
@@ -342,6 +345,8 @@
: "bg-muted/40"
)}
>{clip(resultText(block), RESULT_CLIP)}</pre>
{:else if block.type === "thinking"}
<p class="px-1 text-kind-deep text-xs">thinking</p>
{/if}
{/each}
</div>