refactor: simplify solid reactivity across app and web (#20497)

This commit is contained in:
Shoubhit Dash
2026-04-02 17:14:05 +08:00
committed by GitHub
parent db93891373
commit d540d363a7
8 changed files with 70 additions and 67 deletions
+1 -4
View File
@@ -343,14 +343,12 @@ export function SessionTurn(
})
const assistantDerived = createMemo(() => {
let visible = 0
let tail: "text" | "other" | undefined
let reason: string | undefined
const show = showReasoningSummaries()
for (const message of assistantMessages()) {
for (const part of list(data.store.part?.[message.id], emptyParts)) {
if (partState(part, show) === "visible") {
visible++
tail = part.type === "text" ? "text" : "other"
}
if (part.type === "reasoning" && part.text) {
const h = heading(part.text)
@@ -358,10 +356,9 @@ export function SessionTurn(
}
}
}
return { visible, tail, reason }
return { visible, reason }
})
const assistantVisible = createMemo(() => assistantDerived().visible)
const assistantTailVisible = createMemo(() => assistantDerived().tail)
const reasoningHeading = createMemo(() => assistantDerived().reason)
const showThinking = createMemo(() => {
if (!working() || !!error()) return false