Conversation
Signed-off-by: xinchenok <95321008+xinchenok@users.noreply.github.com>
AAswordman
force-pushed
the
main
branch
2 times, most recently
from
September 20, 2026 05:18
ce7e671 to
f856e35
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
问题
agent_send 已获得回复或因发送错误结束后,本次调用创建的 timeout 定时器仍保留到原始截止时间;多次快速结束的调用会累积尚未触发的定时器与 Promise 回调。
原因
Promise.race 只决定返回哪个结果,不会取消另一个 Promise 的 setTimeout;原实现没有保留定时器句柄,也没有在成功或拒绝后清理。
修复
保存现有 setTimeout 返回的句柄,并在 race 的 finally 中清除;成功、发送拒绝和超时都走同一资源释放路径。保留现有发送、超时结果及错误传播。
改动类型
影响范围
plugins/packages/buildin/extended_chat.ts。验证
7fec1b2f17636c5b392c887fab28552219be807a。git apply --check --whitespace=error-all fix.patch,独立应用检查通过。截图或日志
复现步骤(待验证)
提交者确认
Signed-off-by: xinchenok <95321008+xinchenok@users.noreply.github.com>。基线:
7fec1b2f17636c5b392c887fab28552219be807a。此修复独立提交;已做源码核对和独立补丁应用检查,尚未独立编译或手机实测,因此以 Draft PR 提交。