fix(ui): guard reasoning renderer against undefined text (#28222)

This commit is contained in:
Kit Langton 2026-05-18 16:04:07 -04:00 committed by GitHub
parent d8efc575fa
commit b396b71c6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1563,7 +1563,7 @@ PART_MAPPING["reasoning"] = function ReasoningPartDisplay(props) {
const streaming = createMemo(
() => props.message.role === "assistant" && typeof (props.message as AssistantMessage).time.completed !== "number",
)
const text = () => (data.store.part_text_accum_delta?.[part().id] ?? part().text).trim()
const text = () => (data.store.part_text_accum_delta?.[part().id] ?? part().text ?? "").trim()
return (
<Show when={text()}>