fix: hide chat input actions on h5
parent
e4b45b2cf8
commit
ae9f5e3bdb
|
|
@ -25,6 +25,7 @@ export default function ChatInput(props: {
|
|||
onNewSession: () => void;
|
||||
agentList: Agent[];
|
||||
onInsertMention: (agentName: string) => void;
|
||||
showActions?: boolean;
|
||||
}) {
|
||||
const {
|
||||
input,
|
||||
|
|
@ -44,7 +45,8 @@ export default function ChatInput(props: {
|
|||
onOpenHistory,
|
||||
onNewSession,
|
||||
agentList,
|
||||
onInsertMention
|
||||
onInsertMention,
|
||||
showActions = true
|
||||
} = props;
|
||||
|
||||
const [showMentionPopover, setShowMentionPopover] = useState(false);
|
||||
|
|
@ -194,7 +196,7 @@ export default function ChatInput(props: {
|
|||
</div>
|
||||
|
||||
<div className="chat-input-card-wrap">
|
||||
<div className="chat-input-actions">
|
||||
{showActions && <div className="chat-input-actions">
|
||||
<Tooltip title="历史记录">
|
||||
<Button size="small" type="text" className="chat-input-action-btn" icon={<HistoryIcon />} onClick={onOpenHistory}>
|
||||
历史记录
|
||||
|
|
@ -205,7 +207,7 @@ export default function ChatInput(props: {
|
|||
新建会话
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>}
|
||||
<div className="chat-input-card">
|
||||
<div className="chat-input-stack">
|
||||
<Input.TextArea
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ export default function ChatPageH5({ logic }: { logic: ChatPageLogicOutput }) {
|
|||
<Button size="small" onClick={() => setHistoryDrawerOpen(true)}>
|
||||
历史对话
|
||||
</Button>
|
||||
<Button size="small" type="primary" onClick={handleNewSession}>
|
||||
新建会话
|
||||
</Button>
|
||||
</Space>
|
||||
</div>
|
||||
|
||||
|
|
@ -165,6 +168,7 @@ export default function ChatPageH5({ logic }: { logic: ChatPageLogicOutput }) {
|
|||
onInsertMention={() => {}}
|
||||
onOpenHistory={() => setHistoryDrawerOpen(true)}
|
||||
onNewSession={handleNewSession}
|
||||
showActions={false}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue