Skip to content

Commit bbdab1d

Browse files
authored
fix: entry (#2652)
1 parent 78ad279 commit bbdab1d

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

packages/service/core/workflow/dispatch/agent/runTool/functionCall.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ export const runToolWithFunctionCall = async (
194194
isEntry: true,
195195
inputs: updateToolInputValue({ params: startParams, inputs: item.inputs })
196196
}
197-
: item
197+
: {
198+
...item,
199+
isEntry: false
200+
}
198201
)
199202
});
200203

packages/service/core/workflow/dispatch/agent/runTool/promptCall.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ export const runToolWithPromptCall = async (
226226
isEntry: true,
227227
inputs: updateToolInputValue({ params: startParams, inputs: item.inputs })
228228
}
229-
: item
229+
: {
230+
...item,
231+
isEntry: false
232+
}
230233
)
231234
});
232235

packages/service/core/workflow/dispatch/agent/runTool/toolChoice.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ export const runToolWithToolChoice = async (
209209
isEntry: true,
210210
inputs: updateToolInputValue({ params: startParams, inputs: item.inputs })
211211
}
212-
: item
212+
: {
213+
...item,
214+
isEntry: false
215+
}
213216
)
214217
});
215218

@@ -359,6 +362,7 @@ export const runToolWithToolChoice = async (
359362
};
360363
}
361364
} catch (error) {
365+
console.log(error);
362366
addLog.warn(`LLM response error`, {
363367
requestBody
364368
});

packages/service/core/workflow/dispatch/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,12 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
532532
const entryNodes = runtimeNodes.filter((item) => item.isEntry);
533533

534534
// reset entry
535-
// runtimeNodes.forEach((item) => {
536-
// item.isEntry = false;
537-
// });
535+
runtimeNodes.forEach((item) => {
536+
// Interactive node is not the entry node, return interactive result
537+
if (item.flowNodeType !== FlowNodeTypeEnum.userSelect) {
538+
item.isEntry = false;
539+
}
540+
});
538541
await Promise.all(entryNodes.map((node) => checkNodeCanRun(node)));
539542

540543
// focus try to run pluginOutput

0 commit comments

Comments
 (0)