-
Notifications
You must be signed in to change notification settings - Fork 7
fix: apply post-merge audit fixes to input-queue-deep-dive.md #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||
| # 输入队列与中断机制 Deep-Dive | ||||||
|
|
||||||
| > 当 AI Agent 正在执行工具调用时,用户能否继续输入?输入会被丢弃、阻塞,还是排队等待下一轮?本文基于 Claude Code(v2.1.89 反编译)和 Qwen Code(Gemini CLI fork,开源)的源码分析,深度对比两者在输入队列、中断机制和交互流畅性方面的设计差异。 | ||||||
| > 当 AI Agent 正在执行工具调用时,用户能否继续输入?输入会被丢弃、阻塞,还是排队等待下一轮?本文基于 Claude Code(v2.1.89 反编译)和 Qwen Code(v0.15.0,Gemini CLI fork,开源)的源码分析,深度对比两者在输入队列、中断机制和交互流畅性方面的设计差异。 | ||||||
|
|
||||||
| --- | ||||||
|
|
||||||
|
|
@@ -430,12 +430,19 @@ abort(): void { // 3. 立即终止 | |||||
|
|
||||||
| ### 4.6 预测与预执行 | ||||||
|
|
||||||
| | 能力 | Claude Code | Qwen Code | | ||||||
| | 能力 | Claude Code | Qwen Code(v0.15.0+) | | ||||||
| |------|------------|-----------| | ||||||
| | Prompt Suggestion | ✅ 预测下一步输入 | ❌ | | ||||||
| | Speculation | ✅ 预执行预测结果 | ❌ | | ||||||
| | Early Input | ✅ 启动阶段捕获键入 | ❌ | | ||||||
| | Tab 接受 | ✅ 预执行结果直接注入 | — | | ||||||
| | Prompt Suggestion | ✅ 默认开启 | ✅ 默认开启(`followupSuggestionsEnabled`) | | ||||||
| | Speculation | ✅(ant-only,`USER_TYPE === 'ant'`) | ✅ opt-in(`enableSpeculation: false` 默认关闭) | | ||||||
| | Overlay FS 隔离 | ✅ Copy-on-Write | ✅ Copy-on-Write(`/tmp/qwen-speculation/{pid}/`) | | ||||||
| | Tab 接受 → 结果注入 | ✅ 直接注入对话 | ✅ `acceptSpeculation()` → `addHistory()` | | ||||||
| | 工具安全分类 | ✅ `interruptBehavior` | ✅ `speculationToolGate.ts`(safe/write/boundary/unknown 4 类) | | ||||||
| | Pipelined Suggestion | ✅ speculation 完成后预生成下一个 | ✅ `generatePipelinedSuggestion()` | | ||||||
| | Early Input | ✅ 启动阶段 stdin 捕获 | ❌ | | ||||||
|
|
||||||
| > **重要变化**:Qwen Code v0.15.0(2026-04-03 合入 `#2525`)新增了完整的 follow-up suggestions + speculation 系统,架构与 Claude Code 高度相似。但 speculation 默认关闭,需手动启用。 | ||||||
|
||||||
| > **重要变化**:Qwen Code v0.15.0(2026-04-03 合入 `#2525`)新增了完整的 follow-up suggestions + speculation 系统,架构与 Claude Code 高度相似。但 speculation 默认关闭,需手动启用。 | |
| > **重要变化**:Qwen Code v0.15.0(2026-04-03 合入 qwen-code PR #2525)新增了完整的 follow-up suggestions + speculation 系统,架构与 Claude Code 高度相似。但 speculation 默认关闭,需手动启用。 |
Copilot
AI
Apr 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This references “PR #2525” without specifying which repository. Since this doc lives in a different repo, please disambiguate (e.g., “qwen-code PR #2525”) and/or link to the PR for traceability.
| > Qwen Code 的 speculation 实现于 2026-04-03 合入(PR #2525),与 Claude Code 架构高度相似。 | |
| > Qwen Code 的 speculation 实现于 2026-04-03 合入(qwen-code PR #2525),与 Claude Code 架构高度相似。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Qwen Code Overlay FS path here uses
/tmp/qwen-speculation/{pid}/, but later in the doc the path is/tmp/qwen-speculation/{pid}/{uuid}/. Please make these consistent (or explain the directory structure) to avoid confusing readers.