diff --git a/packages/ui/src/components/session-turn.tsx b/packages/ui/src/components/session-turn.tsx index 9ffa671e6985..c5cea43bf092 100644 --- a/packages/ui/src/components/session-turn.tsx +++ b/packages/ui/src/components/session-turn.tsx @@ -378,6 +378,17 @@ export function SessionTurn( const isShellMode = createMemo(() => !!shellModePart()) + const hasReasoningParts = createMemo(() => { + for (const m of assistantMessages()) { + const msgParts = data.store.part[m.id] + if (!msgParts) continue + for (const p of msgParts) { + if (p?.type === "reasoning") return true + } + } + return false + }) + const rawStatus = createMemo(() => { const msgs = assistantMessages() let last: PartType | undefined @@ -509,6 +520,8 @@ export function SessionTurn( retrySeconds: 0, status: rawStatus(), duration: duration(), + userMessageHovered: false, + showReasoning: false, }) createEffect(() => { @@ -730,7 +743,7 @@ export function SessionTurn( message={assistantMessage} responsePartId={responsePartId()} hideResponsePart={hideResponsePart()} - hideReasoning={!working()} + hideReasoning={!working() && !store.showReasoning} hidden={hidden} /> )} @@ -758,6 +771,22 @@ export function SessionTurn(

{i18n.t("ui.sessionTurn.summary.response")}

+ + + + +
+