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:
@ -2,7 +2,6 @@ import { useSetModalState } from '@/hooks/commonHooks';
|
||||
import {
|
||||
useFetchFlow,
|
||||
useFetchFlowTemplates,
|
||||
useRunFlow,
|
||||
useSetFlow,
|
||||
} from '@/hooks/flow-hooks';
|
||||
import { useFetchLlmList } from '@/hooks/llmHooks';
|
||||
@ -216,19 +215,3 @@ export const useFetchDataOnMount = () => {
|
||||
export const useFlowIsFetching = () => {
|
||||
return useIsFetching({ queryKey: ['flowDetail'] }) > 0;
|
||||
};
|
||||
|
||||
export const useRunGraph = () => {
|
||||
const { data } = useFetchFlow();
|
||||
const { runFlow } = useRunFlow();
|
||||
const { id } = useParams();
|
||||
const { nodes, edges } = useGraphStore((state) => state);
|
||||
const runGraph = useCallback(() => {
|
||||
const dslComponents = buildDslComponentsByGraph(nodes, edges);
|
||||
runFlow({
|
||||
id: id!!,
|
||||
dsl: { ...data.dsl, components: dslComponents },
|
||||
});
|
||||
}, [nodes, edges, runFlow, id, data]);
|
||||
|
||||
return { runGraph };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user