fix: hide thinking when identical to output + default collapsed
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 7s
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 7s
This commit is contained in:
parent
0789114e0a
commit
0fc2366eb9
@ -207,8 +207,8 @@ function ChatPage() {
|
||||
style={{ backgroundColor: msg.role === 'user' ? token.colorPrimary : token.colorSuccess, flexShrink: 0 }} />
|
||||
<div style={{ maxWidth: '75%', minWidth: 0 }}>
|
||||
{/* Thinking — auto expand during streaming */}
|
||||
{msg.thinking && (
|
||||
<Collapse size="small" ghost defaultActiveKey={msg.streaming ? ['thinking'] : []} items={[{
|
||||
{msg.thinking && msg.thinking !== msg.content && (
|
||||
<Collapse size="small" ghost defaultActiveKey={[]} items={[{
|
||||
key: 'thinking', label: <Text style={{ fontSize: 12, color: token.colorTextSecondary }}><BulbOutlined /> 思考过程{msg.streaming ? <LoadingOutlined style={{ marginLeft: 6, fontSize: 11 }} spin /> : null}</Text>,
|
||||
children: <div style={{ fontSize: 13, color: token.colorTextSecondary, whiteSpace: 'pre-wrap', lineHeight: 1.7, maxHeight: 200, overflowY: 'auto', padding: '4px 0' }}>{msg.thinking}</div>,
|
||||
}]} style={{ marginBottom: 8, background: 'transparent' }} />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user