fix(web): stream loading

This commit is contained in:
zhaoying
2026-04-10 18:56:31 +08:00
parent a21dad70ed
commit 3beca641e1
2 changed files with 24 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2025-12-10 16:46:17
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-08 11:23:18
* @Last Modified time: 2026-04-10 18:46:57
*/
import { type FC, useRef, useEffect, useState } from 'react'
import clsx from 'clsx'
@@ -217,7 +217,7 @@ const ChatContent: FC<ChatContentProps> = ({
{/* Message bubble */}
<div className={clsx('rb:text-left rb:leading-5 rb:inline-block rb:wrap-break-word rb:relative', item.role === 'user' ? contentClassNames : '', {
// Error message style (content is null and not assistant message)
'rb:bg-[rgba(255,93,52,0.08)] rb:text-[#FF5D34]': (item.status && item.status !== 'completed') || (errorDesc && item.role === 'assistant' && item.content === null && !renderRuntime),
'rb:text-[#FF5D34]': (item.status && item.status !== 'completed') || (errorDesc && item.role === 'assistant' && item.content === null && !renderRuntime),
// Assistant message style
'rb:bg-[#E3EBFD] rb:p-[10px_12px_2px_12px] rb:rounded-lg rb:max-w-130': item.role === 'user',
'rb:max-w-full rb:w-full': item.role === 'assistant',