fix: allow selecting agent on /chat in h5

main
sp mac bookpro 2605 2026-06-11 19:03:34 +08:00
parent ae9f5e3bdb
commit bdbb45e379
1 changed files with 17 additions and 17 deletions

View File

@ -86,29 +86,29 @@ export default function ChatPageH5({ logic }: { logic: ChatPageLogicOutput }) {
</Drawer>
<section className="chat-main h5-chat-main">
<div style={{ padding: '8px 12px', borderBottom: '1px solid var(--color-border)' }}>
<Space>
<Button size="small" onClick={() => setAgentDrawerOpen(true)}>
</Button>
<Button size="small" disabled={!agent} onClick={() => setOutlineDrawerOpen(true)}>
</Button>
<Button size="small" disabled={!id} onClick={() => setHistoryDrawerOpen(true)}>
</Button>
<Button size="small" type="primary" disabled={!id} onClick={handleNewSession}>
</Button>
</Space>
</div>
{!agent ? (
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Empty description="请选择一个智能体开始对话" />
</div>
) : (
<>
<div style={{ padding: '8px 12px', borderBottom: '1px solid var(--color-border)' }}>
<Space>
<Button size="small" onClick={() => setAgentDrawerOpen(true)}>
</Button>
<Button size="small" onClick={() => setOutlineDrawerOpen(true)}>
</Button>
<Button size="small" onClick={() => setHistoryDrawerOpen(true)}>
</Button>
<Button size="small" type="primary" onClick={handleNewSession}>
</Button>
</Space>
</div>
<ChatHeader
agent={agent}
useStream={sender.useStream}