docs: correct stale CLI flags/keybinding and document model.reasoningEffort - #6219
Conversation
…Effort - Remove nonexistent --all-files/-a and --show-memory-usage flags from the CLI arguments and headless option tables (no longer defined in the yargs parser in packages/cli/src/config/config.ts). - Add the commonly-needed --model/-m flag to the headless options table and fix the --approval-mode example to use the valid choice auto-edit (the parser rejects the underscore form auto_edit). - Drop the stale Meta+Enter alias from the external-editor shortcut; that chord is bound to NEWLINE, while OPEN_EXTERNAL_EDITOR binds only Ctrl+X. - Document the model.reasoningEffort setting (set via /effort), which is exposed in the settings dialog but was missing from the settings reference.
|
Thanks for the PR, @DragonnZhang! Template looks good ✓ On direction: straightforward docs fix — stale flags, wrong keybinding, and a missing setting entry. Keeping docs aligned with the parser is unambiguously valuable and squarely within scope. No concerns. On approach: the diff is minimal and focused — four surgical corrections across three files, each backed by a specific code reference. The scope discipline is excellent: the PR body explicitly calls out additional drift (voice settings, policy settings, missing keybindings) and defers them to a follow-up rather than bundling everything. That's the right call. Moving on to code review. 🔍 中文说明感谢贡献,@DragonnZhang! 模板完整 ✓ 方向:纯粹的文档修正——过时的标志、错误的快捷键、缺失的设置项。保持文档与解析器一致毫无疑问是有价值的,完全在项目范围内。无顾虑。 方案:diff 极小且聚焦——三个文件中四处精准修正,每处都有具体代码引用。范围控制很好:PR body 明确提到了其他漂移(voice 设置、policy 设置、缺失快捷键)并留给后续 PR 处理,而非一股脑塞进来。这是正确的做法。 进入代码审查 🔍 — Qwen Code · qwen3.7-max |
Code ReviewIndependent baseline: for a "docs drifted from code" fix, I'd read the yargs parser in Verified each claim against the codebase:
No issues found. The diff is exactly what it claims to be — four precise corrections, nothing extra. TestingDocs-only change — no user-visible behavior to test via tmux. The "testing" here is the code verification above, which confirms every doc change matches the source of truth. N/A for Before/After. — Qwen Code · qwen3.7-max |
|
This is exactly what a docs-fix PR should look like. Four corrections, each one verifiable against the source, zero extras. The author clearly audited the code before writing — every claim in the PR body checks out when you go look at the parser, keybindings, and settings schema. The scope restraint deserves a callout: there's clearly more docs drift to fix (the PR body lists several other undocumented settings and keybindings), but the author chose to ship the high-confidence, unambiguous fixes now and defer the rest. That's the right instinct — small, correct PRs merge faster and cause fewer conflicts than big "while I'm here" bundles. All stages clean. Approving. ✅ 中文说明这就是文档修正 PR 该有的样子。四处修正,每处都可以对照源码验证,零多余内容。作者显然先审计了代码再动手——PR body 中的每个声明在解析器、快捷键和设置 schema 中都能确认。 值得特别提一下范围控制:显然还有更多文档漂移可以修(PR body 列出了其他几个未记录的设置和快捷键),但作者选择先把高确信度、无歧义的修正发出来,其余留待后续。这是正确的做法——小而正确的 PR 比大而全的更容易合并、更少冲突。 全部阶段通过,批准。✅ — Qwen Code · qwen3.7-max |
qwen-code-ci-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
| | Setting | Type | Description | Default | | ||
| | -------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | | ||
| | `model.name` | string | The Qwen model to use for conversations. | `undefined` | | ||
| | `model.reasoningEffort` | enum | How hard reasoning-capable models think, applied across all providers. Set with the [`/effort`](../features/commands) command (`low`, `medium`, `high`, `xhigh`, `max`). Each provider maps and clamps this to what the active model supports (e.g. Gemini caps at `high`; Anthropic clamps tiers a model lacks). Leave unset to use the model/provider default. | `undefined` | |
There was a problem hiding this comment.
[Suggestion] The new model.reasoningEffort row has trailing whitespace that fails npx prettier --check. CI doesn't currently check Prettier on Markdown, but npm run format would auto-fix this after merge. Running npx prettier --write docs/users/configuration/settings.md before committing would keep things clean.
| | `model.reasoningEffort` | enum | How hard reasoning-capable models think, applied across all providers. Set with the [`/effort`](../features/commands) command (`low`, `medium`, `high`, `xhigh`, `max`). Each provider maps and clamps this to what the active model supports (e.g. Gemini caps at `high`; Anthropic clamps tiers a model lacks). Leave unset to use the model/provider default. | `undefined` | | |
| | `model.reasoningEffort` | enum | How hard reasoning-capable models think, applied across all providers. Set with the [`/effort`](../features/commands) command (`low`, `medium`, `high`, `xhigh`, `max`). Each provider maps and clamps this to what the active model supports (e.g. Gemini caps at `high`; Anthropic clamps tiers a model lacks). Leave unset to use the model/provider default. | `undefined` | |
— qwen3.7-max via Qwen Code /review
What this PR does
Fixes documentation drift found by auditing
docs/against the current codebase. Four corrections, all backed by the code that is the source of truth: (1) removes the--all-files/-aand--show-memory-usageflags from the CLI-argument and headless option tables — neither is defined in the yargs parser anymore; (2) adds the commonly needed--model/-mflag to the headless options table and fixes the--approval-modeexample to use the valid choiceauto-edit(the parser rejects the underscore formauto_edit); (3) drops the staleMeta+Enteralias from the "open external editor" keyboard shortcut, since that chord is bound to newline while the external editor is bound only toCtrl+X; (4) documents themodel.reasoningEffortsetting, which is exposed in the settings dialog and set via/effortbut was missing from the settings reference.Why it's needed
These pages tell users which flags, shortcuts, and settings exist. Documenting flags that the CLI no longer accepts (
--all-files,--show-memory-usage) and an approval-mode value the parser rejects (auto_edit) leads users to commands that error out. TheMeta+Entermapping is wrong (it inserts a newline, not opens the editor). And a real, dialog-exposed setting (model.reasoningEffort) had no reference entry. Aligning the docs with the code removes these onboarding/usage papercuts.Reviewer Test Plan
How to verify
packages/cli/src/config/config.ts, the yargs parser defines--model/-mand restricts--approval-modeto['plan','default','auto-edit','auto','yolo']; there is noall-files/-aorshow-memory-usage/showMemoryUsageoption (confirmed absent repo-wide).qwen -p "hi" --all-filesandqwen --approval-mode auto_editboth fail against the current build.packages/cli/src/config/keyBindings.ts,Command.OPEN_EXTERNAL_EDITORbinds onlyCtrl+X({ key: 'x', ctrl: true }), whileMeta/Cmd+Enter({ key: 'return', command: true }) is bound toCommand.NEWLINE.packages/cli/src/config/settingsSchema.ts,model.reasoningEffortis an enum (low/medium/high/xhigh/max) withshowInDialog: true, set via the/effortcommand already documented indocs/users/features/commands.md.Evidence (Before & After)
N/A (docs-only change).
Tested on
Environment (optional)
N/A — docs-only; verified by reading the parser, keybinding, and settings schema sources.
Risk & Scope
general.voice.*,policy.*,agents.*,permissions.autoMode.*) and a couple of missing keyboard bindings (Alt+Ttoggle thinking,Ctrl+Fshell-input focus); those were left for a follow-up to keep this change focused on the highest-impact, unambiguous drift.Linked Issues
N/A
中文说明
本 PR 的作用
修复对照当前代码库审计
docs/时发现的文档漂移,共四处修正,均以作为事实来源的代码为依据:(1) 从命令行参数表和无头模式选项表中移除--all-files/-a与--show-memory-usage标志——两者在 yargs 解析器中都已不再定义;(2) 在无头模式选项表中加入常用的--model/-m标志,并将--approval-mode示例改为合法取值auto-edit(解析器会拒绝下划线形式的auto_edit);(3) 从“打开外部编辑器”的快捷键中删除已失效的Meta+Enter别名,因为该组合键绑定的是换行,而外部编辑器仅绑定Ctrl+X;(4) 补充model.reasoningEffort设置项的文档,该设置会出现在设置对话框中并通过/effort命令设置,但此前在设置参考中缺失。为什么需要
这些页面告诉用户存在哪些标志、快捷键和设置。记录 CLI 已不再接受的标志(
--all-files、--show-memory-usage)以及解析器会拒绝的审批模式取值(auto_edit),会让用户执行报错的命令。Meta+Enter的映射是错误的(它插入换行,而非打开编辑器)。而一个真实存在、对话框中可见的设置(model.reasoningEffort)此前没有参考条目。使文档与代码保持一致可消除这些上手/使用中的小障碍。复核测试计划
如何验证
packages/cli/src/config/config.ts中,yargs 解析器定义了--model/-m,并将--approval-mode限定为['plan','default','auto-edit','auto','yolo'];不存在all-files/-a或show-memory-usage选项(已在全仓库确认缺失)。qwen -p "hi" --all-files与qwen --approval-mode auto_edit在当前构建下都会失败。packages/cli/src/config/keyBindings.ts中,Command.OPEN_EXTERNAL_EDITOR仅绑定Ctrl+X,而Meta/Cmd+Enter绑定到Command.NEWLINE。packages/cli/src/config/settingsSchema.ts中,model.reasoningEffort是枚举(low/medium/high/xhigh/max),showInDialog: true,通过已在docs/users/features/commands.md记录的/effort命令设置。证据(前后对比)
N/A(仅文档改动)。
测试平台
环境(可选)
N/A——仅文档改动;通过阅读解析器、快捷键与设置 schema 源码验证。
风险与范围
general.voice.*、policy.*、agents.*、permissions.autoMode.*)以及少量缺失的快捷键(Alt+T切换思考、Ctrl+Fshell 输入聚焦);为使本次改动聚焦于影响最大、最明确的漂移,这些留待后续处理。关联 Issue
N/A
Generated by Claude Code