Feat: Convert the prompt field of the agent operator to an array #3221 (#8137)

### What problem does this PR solve?

Feat: Convert the prompt field of the agent operator to an array #3221

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-09 16:02:33 +08:00
committed by GitHub
parent 24625e0695
commit d9b98cbb18
7 changed files with 120 additions and 39 deletions

View File

@ -56,10 +56,13 @@ function filterAllUpstreamNodeIds(edges: Edge[], nodeIds: string[]) {
}, []);
}
function buildOutputOptions(outputs: Record<string, any> = {}) {
function buildOutputOptions(
outputs: Record<string, any> = {},
nodeId?: string,
) {
return Object.keys(outputs).map((x) => ({
label: x,
value: x,
value: `${nodeId}@${x}`,
}));
}
@ -84,7 +87,7 @@ export function useBuildNodeOutputOptions(nodeId?: string) {
label: x.data.name,
value: x.id,
title: x.data.name,
options: buildOutputOptions(x.data.form.outputs),
options: buildOutputOptions(x.data.form.outputs, x.id),
}));
}, [edges, nodeId, nodes]);