Feat: Exported Agent JSON Should Include Conversation Variables Configuration #11796 (#12579)

### 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:
balibabu
2026-01-13 15:35:45 +08:00
committed by GitHub
parent 68e5c86e9c
commit accae95126
4 changed files with 29 additions and 13 deletions

View File

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