mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
chore: cleanup
This commit is contained in:
parent
fc9789d7a7
commit
c7bac83212
1 changed files with 5 additions and 15 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue