import HotKeys from '@/config/hotkeys'; import { CodeOutlined, DeleteOutlined, EnterOutlined, MacCommandOutlined, PlusOutlined } from '@ant-design/icons'; import { useIntl } from '@umijs/max'; import { Button, Col, Row, Space } from 'antd'; import { useHotkeys } from 'react-hotkeys-hook'; import '../style/chat-footer.less'; interface ChatFooterProps { onSubmit: () => void; onClear: () => void; onNewMessage: () => void; onView: () => void; disabled?: boolean; feedback?: React.ReactNode; hasTokenResult?: boolean; } const ChatFooter: React.FC = (props) => { const intl = useIntl(); const { onSubmit, onClear, onNewMessage, onView, feedback, disabled, hasTokenResult } = props; useHotkeys( HotKeys.SUBMIT.join(','), () => { onSubmit(); }, { enabled: !disabled } ); return (
{feedback}
); }; export default ChatFooter;