feat: add tool params node & tool params add array type (#2824)

* add tool params node

* add tool params enum

* node response

* tool add array type params

* fix tool params

* fix

* fix

* fix
This commit is contained in:
heheer
2024-09-28 15:58:55 +08:00
committed by GitHub
parent f2749cbb00
commit 1599d144ce
26 changed files with 438 additions and 28 deletions

View File

@@ -186,6 +186,9 @@ export type DispatchNodeResponseType = {
// form input
formInputResult?: string;
// tool params
toolParamsResult?: Record<string, any>;
};
export type DispatchNodeResultType<T = {}> = {

View File

@@ -234,7 +234,8 @@ export const getReferenceVariableValue = ({
nodes: RuntimeNodeItemType[];
variables: Record<string, any>;
}) => {
if (!isReferenceValue(value)) {
const nodeIds = nodes.map((node) => node.nodeId);
if (!isReferenceValue(value, nodeIds)) {
return value;
}
const sourceNodeId = value[0];