mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: catch errors when sending messages #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,21 +1,19 @@
|
||||
import { Button, Flex, Space } from 'antd';
|
||||
|
||||
import { useSetModalState } from '@/hooks/commonHooks';
|
||||
import { useFetchFlow } from '@/hooks/flow-hooks';
|
||||
import { ArrowLeftOutlined } from '@ant-design/icons';
|
||||
import { Link } from 'umi';
|
||||
import ChatDrawer from '../chat/drawer';
|
||||
import { useRunGraph, useSaveGraph } from '../hooks';
|
||||
import { useSaveGraph } from '../hooks';
|
||||
|
||||
import styles from './index.less';
|
||||
|
||||
const FlowHeader = () => {
|
||||
interface IProps {
|
||||
showChatDrawer(): void;
|
||||
}
|
||||
|
||||
const FlowHeader = ({ showChatDrawer }: IProps) => {
|
||||
const { saveGraph } = useSaveGraph();
|
||||
const { runGraph } = useRunGraph();
|
||||
const {
|
||||
visible: chatDrawerVisible,
|
||||
hideModal: hideChatDrawer,
|
||||
showModal: showChatDrawer,
|
||||
} = useSetModalState();
|
||||
|
||||
const { data } = useFetchFlow();
|
||||
|
||||
return (
|
||||
@ -41,10 +39,6 @@ const FlowHeader = () => {
|
||||
</Button>
|
||||
</Space>
|
||||
</Flex>
|
||||
<ChatDrawer
|
||||
visible={chatDrawerVisible}
|
||||
hideModal={hideChatDrawer}
|
||||
></ChatDrawer>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user