Perf: worfklow scroll cannot wheel. Adapt wrokflow skip circle. Change tab alway output stream (#2688)

* perf: teaxtarea no wheel

* remove render error

* adapt workflow skip circle

* perf: change tab can stream output
This commit is contained in:
Archer
2024-09-12 17:22:52 +08:00
committed by GitHub
parent fde1618af2
commit 56281d92f2
11 changed files with 64 additions and 39 deletions

View File

@@ -374,6 +374,18 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
if (!nodeRunResult) return [];
/*
特殊情况:
通过 skipEdges 可以判断是运行了分支节点。
由于分支节点可能会实现递归调用skip 连线往前递归)
需要把分支节点也加入到已跳过的记录里,可以保证递归 skip 运行时,至多只会传递到当前分支节点,不会影响分支后的内容。
*/
const skipEdges = (nodeRunResult.result[DispatchNodeResponseKeyEnum.skipHandleId] ||
[]) as string[];
if (skipEdges && skipEdges?.length > 0) {
skippedNodeIdList.add(node.nodeId);
}
// In the current version, only one interactive node is allowed at the same time
const interactiveResponse = nodeRunResult.result?.[DispatchNodeResponseKeyEnum.interactive];
if (interactiveResponse) {
@@ -559,7 +571,6 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
// start process width initInput
const entryNodes = runtimeNodes.filter((item) => item.isEntry);
// reset entry
runtimeNodes.forEach((item) => {
// Interactive node is not the entry node, return interactive result