← 返回更新日志

Qwen Code v0.21.3

2026-08-01 · GitHub 原文
<!-- qwen-release-notes:v1 --> ## 亮点 - 增强了 /review 命令,新增测试计划验证、测量失败归因及新的验证透镜,以改进代码变更分析。 ([#8215](https://github.com/QwenLM/qwen-code/pull/8215), [#8218](https://github.com/QwenLM/qwen-code/pull/8218), [#8225](https://github.com/QwenLM/qwen-code/pull/8225), [#8261](https://github.com/QwenLM/qwen-code/pull/8261), [#8315](https://github.com/QwenLM/qwen-code/pull/8315)) - 新增支持项目级命名 fork 配置文件,允许通过 markdown 配置文件定义工具白名单和提示词建议。 ([#8148](https://github.com/QwenLM/qwen-code/pull/8148)) - 启用工作流代理将 shell 命令和编辑的审批请求直接显示至父界面,并支持后台运行。 ([#8240](https://github.com/QwenLM/qwen-code/pull/8240), [#8303](https://github.com/QwenLM/qwen-code/pull/8303)) - 修复了 Anthropic API 集成问题,通过清理工具 ID、防止重复结果块以及确保正确的消息顺序来解决。 ([#8164](https://github.com/QwenLM/qwen-code/pull/8164), [#8165](https://github.com/QwenLM/qwen-code/pull/8165), [#8163](https://github.com/QwenLM/qwen-code/pull/8163), [#8040](https://github.com/QwenLM/qwen-code/pull/8040)) - 提升了 Web Shell 的可用性,新增制品下载功能,修复了文本粘贴可见性问题,并解决了会话回顾上下文切换错误。 ([#8234](https://github.com/QwenLM/qwen-code/pull/8234), [#8230](https://github.com/QwenLM/qwen-code/pull/8230), [#8262](https://github.com/QwenLM/qwen-code/pull/8262)) - 通过新增的 display_image 工具实现了原生终端图像渲染,并恢复了右键菜单及 URL 超链接处理功能。 ([#8217](https://github.com/QwenLM/qwen-code/pull/8217), [#8198](https://github.com/QwenLM/qwen-code/pull/8198)) ## 破坏性变更 暂无已知的破坏性变更。 ## 完整变更列表 ### 功能 - 生命周期钩子现在包含可选的 source_type 和 source_id 字段,帮助平台区分通过不同入口创建的会话。 ([#8155](https://github.com/QwenLM/qwen-code/pull/8155)) by @xurik - 审查工作流现在会验证缓存身份一致性,以防止 GitHub Actions 中缓存写入与读取代理之间的不匹配。 ([#8205](https://github.com/QwenLM/qwen-code/pull/8205)) by @wenshao - 守护进程通道适配器状态现按工作区隔离,以安全支持跨多个工作区的持久化浏览器认证。 ([#8178](https://github.com/QwenLM/qwen-code/pull/8178)) by @qqqys - 新增 verify-capture.mjs 脚本,通过单条命令生成 PR 验证的证据图片,替代了复杂的流水线。 ([#8114](https://github.com/QwenLM/qwen-code/pull/8114)) by @wenshao - 新增 generationConfig.cacheRetention 设置,在默认 5 分钟保留期的同时,支持 Anthropic 扩展的 1 小时提示词缓存层级。 ([#8048](https://github.com/QwenLM/qwen-code/pull/8048)) by @netbrah - CI 启动包检查现在会在 CLI 入口点被错误提升为共享块时失败,从而防止静默执行失败。 ([#8203](https://github.com/QwenLM/qwen-code/pull/8203)) by @wenshao - 在代理工作时向 GitLab 注释添加瞬态 👀 表情符号,并在完成后移除。 ([#8119](https://github.com/QwenLM/qwen-code/pull/8119)) by @OrbitZore - 规范化工具调用遥测数据,确保所有消费者在状态报告和错误分类上保持一致。 ([#8176](https://github.com/QwenLM/qwen-code/pull/8176)) by @doudouOUC - 新增 SessionDelete 钩子事件,在通过 /delete 或 ACP 成功删除历史会话后触发。 ([#8059](https://github.com/QwenLM/qwen-code/pull/8059)) by @xurik - 启用 POST /session 接受并验证调用方提供的 sessionId,而非静默忽略。 ([#7836](https://github.com/QwenLM/qwen-code/pull/7836)) by @qwen-code-dev-bot - 允许 /status、/settings 和 /help 等安全斜杠命令在模型响应流式传输时立即运行。 ([#8130](https://github.com/QwenLM/qwen-code/pull/8130)) by @DragonnZhang - 新增可选的主机工具调用守卫,可在工具运行前拒绝执行,按配置阻止调用。 ([#8032](https://github.com/QwenLM/qwen-code/pull/8032)) by @chiga0 - 向 LLM span 添加 OpenTelemetry GenAI 流式传输属性,记录流式请求的首字时间,并移除私有流属性。 ([#8150](https://github.com/QwenLM/qwen-code/pull/8150)) by @doudouOUC - 在拉取请求上运行 /triage 命令现在会并行触发沙箱验证通道,以立即开始构建和运行测试。 ([#8249](https://github.com/QwenLM/qwen-code/pull/8249)) by @wenshao - 守护进程每个工作区的默认最大会话限制已从 20 增加到 32,以更好地支持重型多会话工作流。 ([#8235](https://github.com/QwenLM/qwen-code/pull/8235)) by @wenshao - Web Shell 的转录和审查视图现在包含制品下载操作,允许用户将 HTML、Markdown 和工作区文件保存到本地。 ([#8234](https://github.com/QwenLM/qwen-code/pull/8234)) by @ytahdn - Forked Dream 工作器现在遵循可选门控,防止在计划清理和工作区操作期间向顶级固定目录写入或编辑文件。 ([#7714](https://github.com/QwenLM/qwen-code/pull/7714)) by @destire-mio - 新增支持项目级命名 fork 配置文件,允许通过 .qwen/fork-profiles 目录中的 markdown 文件定义工具白名单和提示词建议。 ([#8148](https://github.com/QwenLM/qwen-code/pull/8148)) by @destire-mio - 新增 skills.disabledLevels 设置,用于隐藏内置、项目、用户或扩展技能,且不影响主机提供的技能。 ([#8057](https://github.com/QwenLM/qwen-code/pull/8057)) by @zhangxy-zju - 扩展了 /autofix 技能,在保留现有 GitHub Actions 支持的同时,通过明确的用户确认来审查和修复本地工作树。 ([#8121](https://github.com/QwenLM/qwen-code/pull/8121)) by @yiliang114 - 使工作流代理能够将 shell 命令和编辑的审批请求直接显示到父级界面。 ([#8240](https://github.com/QwenLM/qwen-code/pull/8240)) by @qqqys - 增强了 verify 技能,用于评估建议的修复方案,并根据实际代码变更校准重放测试。 ([#8242](https://github.com/QwenLM/qwen-code/pull/8242)) by @wenshao - 自动生成的技能现通过新的项目级管理器进行使用追踪,闲置 30 天后标记为过期,90 天后归档。 ([#7846](https://github.com/QwenLM/qwen-code/pull/7846)) by @DragonnZhang - /review 命令现会对照实际代码变更和工作区状态,验证 PR 描述中测试计划的断言。 ([#8215](https://github.com/QwenLM/qwen-code/pull/8215)) by @wenshao - 更新了验证规则,以明确检查验收标准,并区分空结果与未测量状态。 ([#8295](https://github.com/QwenLM/qwen-code/pull/8295)) by @wenshao - 为 Agent View 添加了基础运行时管理器,支持本地会话管理和终端流桥接。 ([#7799](https://github.com/QwenLM/qwen-code/pull/7799)) by @ZijianZhang989 - 审查输出页脚现包含 Qwen Code CLI 版本,以便将发现的问题追溯至特定版本。 ([#8294](https://github.com/QwenLM/qwen-code/pull/8294)) by @wenshao - 在活跃轮次期间发送的纯文本消息现默认进入运行轮次,并支持可见的队列管理。 ([#8229](https://github.com/QwenLM/qwen-code/pull/8229)) by @ytahdn - 新增了会话工作流视图,以依赖图形式可视化计划执行、代理调用和对话记录。 ([#7580](https://github.com/QwenLM/qwen-code/pull/7580)) by @yiliang114 - 为 /model 命令添加了 --compaction 标志,用于配置专用的聊天压缩模型。 ([#7818](https://github.com/QwenLM/qwen-code/pull/7818)) by @Aleks-0 - 将交互式 TUI 连接到 Goal v3 运行时,新增生命周期命令、状态卡片及改进的输入排队机制。 ([#8005](https://github.com/QwenLM/qwen-code/pull/8005)) by @qqqys - 工作流现支持可选的后台运行模式,返回运行 ID 并通过专用通道报告结果。 ([#8303](https://github.com/QwenLM/qwen-code/pull/8303)) by @qqqys - 为 /review 命令添加了可测量的测试失败归因功能,以准确区分新出现的失败与已有失败。 ([#8218](https://github.com/QwenLM/qwen-code/pull/8218)) by @wenshao - 为 TUI 添加了 display_image 工具,支持使用原生终端功能或 chafa 回退机制渲染 PNG 图片,限制大小为 8 MiB。 ([#8217](https://github.com/QwenLM/qwen-code/pull/8217)) by @DragonnZhang - 增强了 /review 命令,新增裁决渲染、工作流步骤提取及三个新的验证视图。 ([#8225](https://github.com/QwenLM/qwen-code/pull/8225)) by @wenshao - /review 命令现借鉴了 Claude Code 的召回机制、修复循环及基于代码量的预算分配,以改进问题发现展示和 diff 成本估算。 ([#8315](https://github.com/QwenLM/qwen-code/pull/8315)) by @wenshao - 审查轮次记录现嵌入已发布的审查正文中,以跨环境持久化数据,并允许默认工作量级别恢复上一轮数据。 ([#8255](https://github.com/QwenLM/qwen-code/pull/8255)) by @wenshao - 审查流程现可检测空 diff 或折叠 diff 以提前终止,并在应用七个新验证视图的同时,建议关闭已替代的分支。 ([#8261](https://github.com/QwenLM/qwen-code/pull/8261)) by @wenshao ### 错误修复 - 修复了当未配置 Bearer 认证时,Web Shell 无法在回环守护进程上创建 scratch 工作区的问题。 ([#8204](https://github.com/QwenLM/qwen-code/pull/8204)) by @wenshao - 更新 `setPermissionMode` E2E 测试以使用共享的 `TEST_TIMEOUT` 常量,解决了 CI 运行器上间歇性超时的问题。 ([#8135](https://github.com/QwenLM/qwen-code/pull/8135)) by @qwen-code-dev-bot - 如果 GitHub 因速率限制明确拒绝了初始写入,GitHub 频道的最终回复现在会被排队并在重启时重试。 ([#8087](https://github.com/QwenLM/qwen-code/pull/8087)) by @yiliang114 - fix(core):容忍对话记录时间戳漂移 ([#7886](https://github.com/QwenLM/qwen-code/pull/7886)) by @doudouOUC - 新增 `Ctrl+Tab` 和 `Ctrl+Shift+Tab` 作为切换 `@` 补全标签页的备选快捷键,以避免与终端单词移动绑定冲突。 ([#8074](https://github.com/QwenLM/qwen-code/pull/8074)) by @qwen-code-dev-bot - 新增未捕获异常处理器,通过确保错误被记录并在终端显示以供调试,防止 VP 模式下发生静默崩溃。 ([#8088](https://github.com/QwenLM/qwen-code/pull/8088)) by @chiga0 - 修复 `compactString`,即使截断标记本身超出指定预算,也严格遵循字符限制。 ([#7872](https://github.com/QwenLM/qwen-code/pull/7872)) by @chinesepowered - 对 Web Shell UI 中的内置代理类型名称进行中文本地化,以防止中文用户出现中英文混排显示问题。 ([#8209](https://github.com/QwenLM/qwen-code/pull/8209)) by @wenshao - 修复发布工作流,正确锚定注释并限制发布正文长度,以防止 GitHub API 验证错误。 ([#8199](https://github.com/QwenLM/qwen-code/pull/8199)) by @wenshao - 修复助手轮次预填充时的 400 错误,并恢复在 Claude 4.6+ 和 5.x 模型上的可见思考输出。 ([#8040](https://github.com/QwenLM/qwen-code/pull/8040)) by @netbrah - 确保工具结果出现在用户消息的其他内容之前,以防止 Anthropic API 拒绝请求。 ([#8165](https://github.com/QwenLM/qwen-code/pull/8165)) by @netbrah - 清理工具 ID 以符合 Anthropic 的字符要求,并防止出现空 ID 错误。 ([#8164](https://github.com/QwenLM/qwen-code/pull/8164)) by @netbrah - 通过自适应长模型名称的宽度并添加悬停提示框,修复模型选择器下拉菜单的文本截断问题。 ([#8220](https://github.com/QwenLM/qwen-code/pull/8220)) by @wenshao - 通过对确定性工具结果进行断言,稳定了异步 SDK MCP 工具处理程序的易失败集成测试。 ([#8223](https://github.com/QwenLM/qwen-code/pull/8223)) by @qwen-code-dev-bot - 修复测试隔离问题,确保工作树符号链接测试的临时目录每次运行唯一且完全清理。 ([#8228](https://github.com/QwenLM/qwen-code/pull/8228)) by @wenshao - 修复内存使用显示,当四舍五入值达到下一个边界时,正确显示 MB 或 GB 等单位。 ([#7871](https://github.com/QwenLM/qwen-code/pull/7871)) by @chinesepowered - 防止子代理向用户发起交互式提问,以避免后台任务期间无限期等待。 ([#8219](https://github.com/QwenLM/qwen-code/pull/8219)) by @DragonnZhang - 修复命令拆分逻辑,正确将裸 `&` 操作符视为权限检查的命令边界。 ([#7864](https://github.com/QwenLM/qwen-code/pull/7864)) by @chinesepowered - 在现有的 `Ctrl+V` 绑定基础上,新增 `Option+V` 作为 macOS 下粘贴剪贴板图片的快捷键。 ([#8120](https://github.com/QwenLM/qwen-code/pull/8120)) by @qwen-code-dev-bot - 修复一个缺陷:对话框打开时,鼠标滚轮事件可能会短暂滚动后台视口。 ([#8089](https://github.com/QwenLM/qwen-code/pull/8089)) by @kagura-agent - 修复 CI 失败问题:冲突的颜色环境变量导致额外的警告输出,从而破坏了 PNG 捕获测试。 ([#8236](https://github.com/QwenLM/qwen-code/pull/8236)) by @ytahdn - 新增工作区限定内存操作及新的 CLI 选项,按所选工作区隔离托管的项目内存。 ([#8056](https://github.com/QwenLM/qwen-code/pull/8056)) by @qqqys - 修复 Web Shell,确保无论长度如何,粘贴的纯文本在编辑器中始终保持完全可见且可编辑。 ([#8230](https://github.com/QwenLM/qwen-code/pull/8230)) by @ytahdn - Qwen Autofix 现在仅在关联已验证提交时解决审查线程,若 PR 头部发生变化或结果不明确,则防止自动解决。 ([#8231](https://github.com/QwenLM/qwen-code/pull/8231)) by @wenshao - Autofix 现在允许最多十轮建议级别的修改,之后将限制进一步编辑仅针对关键发现、失败检查或基础冲突。 ([#8247](https://github.com/QwenLM/qwen-code/pull/8247)) by @wenshao - 系统现在能够恢复嵌入在纯文本模型响应中的 XML 风格工具调用,防止代理循环在长会话中中断。 ([#8037](https://github.com/QwenLM/qwen-code/pull/8037)) by @qwen-code-dev-bot - 将 external-context 依赖升级至 MCP SDK 1.30.0,并修补 Hono 版本以解决安全公告,同时为移动包保持 Node 18 兼容性。 ([#8206](https://github.com/QwenLM/qwen-code/pull/8206)) by @doudouOUC - 修复了因重复的工具结果块共享相同 ID 导致 Anthropic API 请求返回 400 错误的问题,通过确保仅保留第一个结果。 ([#8163](https://github.com/QwenLM/qwen-code/pull/8163)) by @netbrah - web-shell 中的后台任务轮询现在静默处理临时网络故障,以防止重复的错误通知,同时仍会报告持续的严重故障。 ([#7923](https://github.com/QwenLM/qwen-code/pull/7923)) by @han-dreamer - Channel ACP 桥接现在能够在主机长时间休眠或事件循环停滞后自动恢复,无需重新连接完整消息适配器。 ([#8211](https://github.com/QwenLM/qwen-code/pull/8211)) by @yiliang114 - 修复了启动时输入框中显示原始 SGR 鼠标转义序列的问题,通过在早期输入捕获期间正确过滤它们来解决。 ([#8268](https://github.com/QwenLM/qwen-code/pull/8268)) by @qwen-code-dev-bot - 稳定思考块的高度以防止布局偏移,并将全屏转录覆盖层替换为内联的 Ctrl+O 切换按钮。 ([#8077](https://github.com/QwenLM/qwen-code/pull/8077)) by @chiga0 - 完成了跨 TUI、ACP 和非交互式 CLI 入口点的图像 @ 引用路由,并保持一致的安全验证。 ([#7206](https://github.com/QwenLM/qwen-code/pull/7206)) by @yiliang114 - 修复了不稳定的 ACP cron 集成测试,通过设置 QWEN_CODE_TEST_CRON_FAST 在延迟 5 秒后触发作业,而非等待真实时间。 ([#8243](https://github.com/QwenLM/qwen-code/pull/8243)) by @qwen-code-dev-bot - 防止出现陈旧的思考块,当关联的工具调用变为孤立状态或包含空文本时将其移除。 ([#8166](https://github.com/QwenLM/qwen-code/pull/8166)) by @netbrah - 在狭窄的消息区域中通过隐藏标签和统计数据来压缩高级表格工具栏,同时保持关键操作可见。 ([#8264](https://github.com/QwenLM/qwen-code/pull/8264)) by @ytahdn - 修复了恢复后移动端编辑器的显示问题,通过移除损坏的 WebGL 覆盖层并将动画占位符限制在新会话中。 ([#8263](https://github.com/QwenLM/qwen-code/pull/8263)) by @ytahdn - 修复了 Windows 上的测试套件失败问题,通过正确处理路径分隔符、换行符和临时目录。 ([#8050](https://github.com/QwenLM/qwen-code/pull/8050)) by @yiliang114 - 将验证报告渲染为格式化的 Markdown 而非转义的原始文本,以提高评论中的可读性。 ([#8147](https://github.com/QwenLM/qwen-code/pull/8147)) by @wenshao - 防止在快速切换上下文时,自动会话摘要出现在错误的 Web Shell 会话中。 ([#8262](https://github.com/QwenLM/qwen-code/pull/8262)) by @wenshao - 修正了重新运行摘要消息,以准确描述已存在但延期且未投票的机器人审查。 ([#8273](https://github.com/QwenLM/qwen-code/pull/8273)) by @wenshao - 修复了由先前容器化作业遗留的文件权限错误导致的自托管运行器失败问题。 ([#8115](https://github.com/QwenLM/qwen-code/pull/8115)) by @qwen-code-dev-bot - 修复了 Web Shell 中的一个问题,即审批对话框中出现了带有相同标签的重复权限按钮。 ([#8250](https://github.com/QwenLM/qwen-code/pull/8250)) by @qwen-code-dev-bot - 修复了通知生成器,使其能正确包含依赖树中多个不同版本安装的包的许可证文本。 ([#8272](https://github.com/QwenLM/qwen-code/pull/8272)) by @yiliang114 - 启用提及支持时,QQ 机器人群聊消息现在会在提示词中显示发送者的完整 openid,以增强模型上下文。 ([#8233](https://github.com/QwenLM/qwen-code/pull/8233)) by @Eric-GoodBoy-Tech - 通过显式设置主代理预算以匹配外层步骤的时间限制,修复了 AutoFix 超时问题。 ([#8257](https://github.com/QwenLM/qwen-code/pull/8257)) by @wenshao - 通过添加 ui.mouseTracking 设置并实现应用程序级超链接处理,恢复了右键菜单和 URL 点击功能。 ([#8198](https://github.com/QwenLM/qwen-code/pull/8198)) by @qwen-code-dev-bot - 将长工具输出的硬截断替换为可折叠视图,保留完整内容并改善滚动体验。 ([#8251](https://github.com/QwenLM/qwen-code/pull/8251)) by @destire-mio ### Performance - 文件搜索爬取速度现在更快,通过缓存目录忽略查找来避免对同级文件进行冗余检查。 ([#8253](https://github.com/QwenLM/qwen-code/pull/8253)) by @dexhunter ### Documentation - 添加了一个可运行的 Python 示例,演示如何为 PreToolUse HTTP 钩子实现外部判断服务。 ([#8202](https://github.com/QwenLM/qwen-code/pull/8202)) by @babyblueviper1 - 将 Web Shell 设计文档重新组织到专用目录中,以改善导航和命名一致性。 ([#8304](https://github.com/QwenLM/qwen-code/pull/8304)) by @water-in-stone - 文档现在涵盖了 /learn 命令、Skill 发现来源,并明确说明个人和项目 Skill 编辑支持热重载,无需重启(裸模式除外)。 ([#8298](https://github.com/QwenLM/qwen-code/pull/8298)) by @DragonnZhang ### Internal Changes - 简化了 Web Shell 中插件管理器的按钮标签为“添加”、“上传”和“创建”,以便在英文和中文界面中更加简洁。([#8174](https://github.com/QwenLM/qwen-code/pull/8174)) by @ytahdn - 重构了内部工作流执行的所有权,以改进会话管理和取消处理。([#8140](https://github.com/QwenLM/qwen-code/pull/8140)) by @qqqys - 将 acp-cron 集成测试迁移为使用伪造的 OpenAI 服务器以获取确定性响应,并隔离了智能体主目录。([#8082](https://github.com/QwenLM/qwen-code/pull/8082)) by @qwen-code-dev-bot - 子代理执行的端到端(E2E)测试现在继承测试套件默认的超时时间,而非严格的 60 秒限制,从而防止在多轮模型工作流中出现失败。([#8246](https://github.com/QwenLM/qwen-code/pull/8246)) by @qwen-code-dev-bot - 为稳定主分支测试套件,已跳过两个依赖特定实时模型工具选择的 SDK E2E 不稳定测试用例。([#8259](https://github.com/QwenLM/qwen-code/pull/8259)) by @qwen-code-dev-bot - 本次发布无面向用户的更改。([#7967](https://github.com/QwenLM/qwen-code/pull/7967)) by @doudouOUC - 无面向用户的更改;本次发布重构了内部 CLI 依赖项以改进代码组织。([#8141](https://github.com/QwenLM/qwen-code/pull/8141)) by @yiliang114 - 修复了工具权限回调中中止信号的 E2E 不稳定测试,以确保确定性执行。([#8300](https://github.com/QwenLM/qwen-code/pull/8300)) by @qwen-code-dev-bot - 修复了测试框架的参数顺序以正确传递 locale 参数,解决了中文本地化检查失败的问题。([#8314](https://github.com/QwenLM/qwen-code/pull/8314)) by @yiliang114 - 修复了当扩展从符号链接目录加载时 ACP 进程静默启动失败的问题。([#8309](https://github.com/QwenLM/qwen-code/pull/8309)) by @Wchoi189 - 通过使用脚本化的本地响应,SDK 编排端到端测试现在具备确定性,在保持核心覆盖范围的同时将测试用例从 22 个减少至 8 个。([#8312](https://github.com/QwenLM/qwen-code/pull/8312)) by @yiliang114 ## 新贡献者 - @babyblueviper1 在 [#8202](https://github.com/QwenLM/qwen-code/pull/8202) 中首次作出贡献 - @Wchoi189 在 [#8309](https://github.com/QwenLM/qwen-code/pull/8309) 中首次作出贡献 **完整更新日志**: https://github.com/QwenLM/qwen-code/compare/v0.21.2...v0.21.3