Unify mode shortcuts across desktop and CLI / 统一桌面端与 CLI 模式快捷键#3885
Conversation
bcdb1f0 to
0f729f5
Compare
0f729f5 to
46f5033
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
esengine
left a comment
There was a problem hiding this comment.
Approving. Putting Plan on Shift+Tab and tool-approval on its own axis is consistent with the separate-posture model, and the unified surface (desktop / CLI / serve / docs / i18n, both EN and ZH) is thorough. toggleYoloMode's Ask/Auto base restore is correct, and the regression tests + go test/frontend gates cover it.
Two trade-offs I'm accepting knowingly so they're on the record:
- Ctrl+Y now toggles YOLO directly (a single keystroke into --dangerously-skip-permissions, on a key that collides with readline yank / BSD DSUSP). The previous "a shortcut never crosses a permission boundary" rule is intentionally dropped here.
- Auto has no keyboard entry in the pure TUI anymore; it's reachable via clients/APIs or as the YOLO-off restore target.
Both are fine for the direction we want. Minor, non-blocking: cycleHint() is now a trivial pass-through to ChatStatusCycleHint, and shortcut_layout still drives modeTagText despite the "removed layout-specific semantics" framing — worth tidying whenever this file is next touched. Thanks for the careful docs.
Summary
Shift+Tabtoggles Plan only, whileCtrl+Y/Cmd+Ytoggles YOLO where the client can capture it./paste-imagefor CLI image paste.[ui].shortcut_layoutas a compatibility setting while removing layout-specific shortcut semantics.Documentation links
Documentation added
English
Shortcuts are documented by client because users usually look for the keys that work in the surface they are using. The small rule is:
Shift+Tabonly controls Plan,Ctrl/Cmd+Yonly controls YOLO, and paste stays on the platform paste key.Desktop GUI
Shift+TabCtrl+Y/Cmd+YShift+Tab.Cmd+Von macOS,Ctrl+Von Windows/LinuxCLI / TUI
Shift+TabCtrl+YCmd+Y, butCtrl+Yis the reliable terminal shortcut.--yolo,--dangerously-skip-permissionsCtrl+Y.Shift+Tab; use clients or APIs that expose the tool approval posture directly.Ctrl+V/paste-image/goal <objective>,/goal status,/goal clear[ui].shortcut_layoutis still accepted for old configs, but the shortcut behavior above is unified across layouts.中文
这里按使用端来写,因为用户通常是先知道“我现在在桌面端/CLI”,再找对应按键。核心规则很小:
Shift+Tab只管 Plan,Ctrl/Cmd+Y只管 YOLO,粘贴继续走系统粘贴快捷键。桌面端 GUI
Shift+TabCtrl+Y/Cmd+YShift+Tab是同一个模式。Cmd+V,Windows/LinuxCtrl+VCLI / TUI
Shift+TabCtrl+YCmd+Y,但稳定可用的是Ctrl+Y。--yolo、--dangerously-skip-permissionsCtrl+Y是同一个运行时模式。Shift+Tab进入,需要由暴露工具审批姿态的客户端或 API 直接设置。Ctrl+V/paste-image/goal <目标>、/goal status、/goal clear[ui].shortcut_layout仍被接受以兼容旧配置,但上面的快捷键行为已经跨布局统一。Validation
git diff --checkgo test ./...npm --prefix desktop/frontend testnpm --prefix desktop/frontend run typechecknpm --prefix desktop/frontend run test:typechecknpm --prefix desktop/frontend run buildNote: the frontend build still reports the existing Vite large chunk warning.