fix: allow selecting agent on /chat in h5
parent
ae9f5e3bdb
commit
bdbb45e379
|
|
@ -86,29 +86,29 @@ export default function ChatPageH5({ logic }: { logic: ChatPageLogicOutput }) {
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
||||||
<section className="chat-main h5-chat-main">
|
<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 ? (
|
{!agent ? (
|
||||||
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
|
||||||
<Empty description="请选择一个智能体开始对话" />
|
<Empty description="请选择一个智能体开始对话" />
|
||||||
</div>
|
</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
|
<ChatHeader
|
||||||
agent={agent}
|
agent={agent}
|
||||||
useStream={sender.useStream}
|
useStream={sender.useStream}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue