Fix assistant message display content fallback logic
- Handle undefined vs empty string cases - Prevent COT content keep rendering before </think> tag recieved
This commit is contained in:
parent
569ed94d15
commit
f1d6d949f1
1 changed files with 1 additions and 1 deletions
|
|
@ -53,7 +53,7 @@ export const ChatMessage = ({ message }: { message: MessageWithError }) => { //
|
|||
// For assistant messages, we prefer displayContent but fallback to content for backward compatibility
|
||||
const finalDisplayContent = message.role === 'user'
|
||||
? message.content
|
||||
: displayContent || message.content || ''
|
||||
: (displayContent !== undefined ? displayContent : (message.content || ''))
|
||||
|
||||
// Load KaTeX dynamically
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue