mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-31 07:36:46 +08:00
### What problem does this PR solve? Feat: Exported Agent JSON Should Include Conversation Variables Configuration #11796 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { useFetchAgent } from '@/hooks/use-agent-request';
|
||||
import { downloadJsonFile } from '@/utils/file-util';
|
||||
import { pick } from 'lodash';
|
||||
import { useCallback } from 'react';
|
||||
import { useBuildDslData } from './use-build-dsl';
|
||||
|
||||
@ -8,7 +9,8 @@ export const useHandleExportJsonFile = () => {
|
||||
const { data } = useFetchAgent();
|
||||
|
||||
const handleExportJson = useCallback(() => {
|
||||
downloadJsonFile(buildDslData().graph, `${data.title}.json`);
|
||||
const dsl = pick(buildDslData(), ['graph', 'globals', 'variables']);
|
||||
downloadJsonFile(dsl, `${data.title}.json`);
|
||||
}, [buildDslData, data.title]);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user