Feat: In a dialog message, users can enter different types of data #3221 (#8583)

### What problem does this PR solve?

Feat: In a dialog message, users can enter different types of data #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-30 19:32:40 +08:00
committed by GitHub
parent cf8c063a69
commit d620432e3b
5 changed files with 110 additions and 83 deletions

View File

@ -14,6 +14,7 @@ import { useGetBeginNodeDataQuery } from '../hooks/use-get-begin-query';
import { useSaveGraphBeforeOpeningDebugDrawer } from '../hooks/use-save-graph';
import { BeginQuery } from '../interface';
import useGraphStore from '../store';
import { buildBeginQueryWithObject } from '../utils';
const RunSheet = ({
hideModal,
@ -34,16 +35,7 @@ const RunSheet = ({
const beginNode = getNode(BeginId);
const inputs: Record<string, BeginQuery> = beginNode?.data.form.inputs;
const nextInputs = Object.keys(inputs).reduce<Record<string, BeginQuery>>(
(pre, key) => {
const item = nextValues.find((x) => x.key === key);
if (item) {
pre[key] = { ...item };
}
return pre;
},
{},
);
const nextInputs = buildBeginQueryWithObject(inputs, nextValues);
const currentNodes = updateNodeForm(BeginId, nextInputs, ['inputs']);
handleRun(currentNodes);