Skip to content

Commit d0f9672

Browse files
authored
fix: plugin catch (#6643)
1 parent 064b2ce commit d0f9672

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

document/content/docs/self-host/upgrading/4-14/4149.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ CODE_SANDBOX_TOKEN=代码运行沙盒的凭证
6868
14. 用户输入框消息不转义成 markdown 格式
6969
15. 修复 AgentV2 部分上下文拼接错误。
7070
16. login 接口安全风险。
71+
17. 工作流工具未按预期连接到结束节点时,嵌套调用工作流工具会导致父工作流无法停止。
7172

7273
## 代码优化
7374

document/data/doc-last-modified.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
"document/content/docs/self-host/upgrading/4-14/4140.mdx": "2026-03-03T17:39:47+08:00",
221221
"document/content/docs/self-host/upgrading/4-14/4141.en.mdx": "2026-03-03T17:39:47+08:00",
222222
"document/content/docs/self-host/upgrading/4-14/4141.mdx": "2026-03-03T17:39:47+08:00",
223-
"document/content/docs/self-host/upgrading/4-14/41410.mdx": "2026-03-24T18:02:38+08:00",
223+
"document/content/docs/self-host/upgrading/4-14/41410.mdx": "2026-03-25T14:45:38+08:00",
224224
"document/content/docs/self-host/upgrading/4-14/4142.en.mdx": "2026-03-03T17:39:47+08:00",
225225
"document/content/docs/self-host/upgrading/4-14/4142.mdx": "2026-03-03T17:39:47+08:00",
226226
"document/content/docs/self-host/upgrading/4-14/4143.en.mdx": "2026-03-03T17:39:47+08:00",
@@ -240,7 +240,7 @@
240240
"document/content/docs/self-host/upgrading/4-14/41481.en.mdx": "2026-03-09T12:02:02+08:00",
241241
"document/content/docs/self-host/upgrading/4-14/41481.mdx": "2026-03-09T17:39:53+08:00",
242242
"document/content/docs/self-host/upgrading/4-14/4149.en.mdx": "2026-03-23T12:17:04+08:00",
243-
"document/content/docs/self-host/upgrading/4-14/4149.mdx": "2026-03-25T13:54:15+08:00",
243+
"document/content/docs/self-host/upgrading/4-14/4149.mdx": "2026-03-25T14:45:38+08:00",
244244
"document/content/docs/self-host/upgrading/outdated/40.en.mdx": "2026-03-03T17:39:47+08:00",
245245
"document/content/docs/self-host/upgrading/outdated/40.mdx": "2026-03-03T17:39:47+08:00",
246246
"document/content/docs/self-host/upgrading/outdated/41.en.mdx": "2026-03-03T17:39:47+08:00",

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,6 @@ export class WorkflowQueue {
669669
await this.processSkipNodes();
670670
continue;
671671
} else {
672-
this.resolve(this);
673672
break;
674673
}
675674
}
@@ -679,7 +678,6 @@ export class WorkflowQueue {
679678
await this.processSkipNodes();
680679
continue;
681680
} else {
682-
this.resolve(this);
683681
break;
684682
}
685683
}
@@ -688,7 +686,9 @@ export class WorkflowQueue {
688686
if (this.activeRunQueue.size === 0 || runningNodePromises.size >= this.maxConcurrency) {
689687
if (runningNodePromises.size > 0) {
690688
// 当上一个节点运行结束时,立即运行下一轮
691-
await Promise.race(runningNodePromises);
689+
await Promise.race(runningNodePromises).catch((error) => {
690+
logger.error('Workflow race error', { error });
691+
});
692692
} else {
693693
// 理论上不应出现此情况,防御性退回到让出进程
694694
await surrenderProcess();
@@ -713,6 +713,7 @@ export class WorkflowQueue {
713713
}
714714
}
715715
} finally {
716+
this.resolve(this);
716717
this.processingActive = false;
717718
}
718719
}
@@ -1100,6 +1101,7 @@ export class WorkflowQueue {
11001101
(Array.isArray(toolResponses) && toolResponses.length > 0) ||
11011102
(!Array.isArray(toolResponses) &&
11021103
typeof toolResponses === 'object' &&
1104+
toolResponses !== null &&
11031105
Object.keys(toolResponses).length > 0)
11041106
) {
11051107
this.toolRunResponse = toolResponses;

packages/service/core/workflow/dispatch/plugin/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ export const dispatchRunPlugin = async (props: RunPluginProps): Promise<RunPlugi
229229
acc[key] = output.pluginOutput![key];
230230
return acc;
231231
}, {})
232-
: null,
232+
: undefined,
233233
[DispatchNodeResponseKeyEnum.customFeedbacks]: customFeedbacks
234234
};
235235
} catch (error) {

0 commit comments

Comments
 (0)