Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions ui/src/components/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ function UserMessage() {
}

function AssistantMessage() {
const message = useAuiState()
const isRunning = message.status?.type === 'running'
const hasText = message.content?.some(c => c.type === 'text' && c.text?.trim())
const reasoningParts = message.content?.filter(c => c.type === 'reasoning') || []
// Current assistant-ui versions require an explicit state selector.
// Subscribe only to the fields this message renderer uses so streaming
// updates remain stable and do not try to read the entire store.
const isRunning = useAuiState(s => s.message.status?.type === 'running')
const content = useAuiState(s => s.message.content)
const hasText = content?.some(c => c.type === 'text' && c.text?.trim())
const reasoningParts = content?.filter(c => c.type === 'reasoning') || []

if (!hasText && isRunning) {
return (
Expand Down