fix(agents): preserve explicit active run aborts · openclaw/openclaw@f454d62
obviyus
·
2026-05-31
·
via Recent Commits to openclaw:main
File tree
src/agents/embedded-agent-runner/run
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3100,6 +3100,10 @@ export async function runEmbeddedAttempt(
|
3100 | 3100 | } |
3101 | 3101 | }; |
3102 | 3102 | |
| 3103 | +const abortActiveRunExternally = () => { |
| 3104 | +externalAbort = true; |
| 3105 | +abortRun(); |
| 3106 | +}; |
3103 | 3107 | const queueHandle: EmbeddedAgentQueueHandle & { |
3104 | 3108 | kind: "embedded"; |
3105 | 3109 | cancel: (reason?: "user_abort" | "restart" | "superseded") => void; |
@@ -3115,10 +3119,8 @@ export async function runEmbeddedAttempt(
|
3115 | 3119 | isCompacting: () => subscription.isCompacting(), |
3116 | 3120 | supportsTranscriptCommitWait: true, |
3117 | 3121 | sourceReplyDeliveryMode: params.sourceReplyDeliveryMode, |
3118 | | -cancel: () => { |
3119 | | -abortRun(); |
3120 | | -}, |
3121 | | -abort: abortRun, |
| 3122 | +cancel: abortActiveRunExternally, |
| 3123 | +abort: abortActiveRunExternally, |
3122 | 3124 | }; |
3123 | 3125 | let lastAssistant: AssistantMessage | undefined; |
3124 | 3126 | let currentAttemptAssistant: EmbeddedRunAttemptResult["currentAttemptAssistant"]; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。