fix: hide chat input actions on h5

main
sp mac bookpro 2605 2026-06-11 18:58:26 +08:00
parent e4b45b2cf8
commit ae9f5e3bdb
2 changed files with 9 additions and 3 deletions

View File

@ -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

View File

@ -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}
/>
</>
)}