diff options
| author | Adam <[email protected]> | 2025-12-13 16:17:32 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-13 16:17:32 -0600 |
| commit | c7bac8321213f4d81a29df4d0a85539dc2faaa34 (patch) | |
| tree | 38544c1f4626c202106a75c18d888a5abc7f936f | |
| parent | fc9789d7a79a6dd9eb9bf22bfcc389fc730a4e67 (diff) | |
| download | opencode-c7bac8321213f4d81a29df4d0a85539dc2faaa34.tar.gz opencode-c7bac8321213f4d81a29df4d0a85539dc2faaa34.zip | |
chore: cleanup
| -rw-r--r-- | packages/ui/src/components/session-turn.tsx | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/packages/ui/src/components/session-turn.tsx b/packages/ui/src/components/session-turn.tsx index 36590553e..b50e4c8a0 100644 --- a/packages/ui/src/components/session-turn.tsx +++ b/packages/ui/src/components/session-turn.tsx @@ -77,11 +77,7 @@ export function SessionTurn( } function scrollToBottom() { - if (!scrollRef) return - if (state.userScrolled) return - if (!working()) return - if (state.autoScrolling) return - + if (!scrollRef || state.userScrolled || !working() || state.autoScrolling) return setState("autoScrolling", true) requestAnimationFrame(() => { scrollRef?.scrollTo({ top: scrollRef.scrollHeight, behavior: "auto" }) @@ -199,20 +195,14 @@ export function SessionTurn( default: break } - } - - if (last.type === "reasoning") { + } else if (last.type === "reasoning") { const text = last.text ?? "" - const trimmed = text.trimStart() - const match = trimmed.match(/^\*\*(.+?)\*\*/) + const match = text.trimStart().match(/^\*\*(.+?)\*\*/) if (match) return `Thinking ยท ${match[1].trim()}` return "Thinking" - } - - if (last.type === "text") { + } else if (last.type === "text") { return "Gathering thoughts" } - return undefined }) @@ -315,7 +305,7 @@ export function SessionTurn( <Spinner /> </Show> <Switch> - <Match when={working()}>{store.status ?? "Considering next steps..."}</Match> + <Match when={working()}>{store.status ?? "Considering next steps"}</Match> <Match when={store.stepsExpanded}>Hide steps</Match> <Match when={!store.stepsExpanded}>Show steps</Match> </Switch> |
