提交前确认 · Pre-submission checklist
问题类别 · Category
模型设置 / 切换 · Model config / switching
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
使用场景 · Use case
When I'm deep in a keyboard flow (typing a prompt, queuing follow-ups), switching the model or reasoning effort today means reaching for the mouse to click the toolbar trigger, or remembering that Ctrl+M exists — which is undiscoverable. Worse: out of habit I sometimes type /model into the chat input, and today that text is submitted verbatim as a prompt to the model instead of doing anything useful, which is surprising for a command-shaped input.
Related but different from #646 (in-chat model switching UI) and #164 (exposing /hooks //mcp//plugins commands): what's missing is the simplest keyboard path — a slash command that opens the model / reasoning dropdowns that already exist in the composer.
建议方案 · Proposal
Make /model and /reasoning first-class local commands in the GUI composer:
- Selecting
/model or /reasoning from the / autocomplete panel opens the same dropdown as clicking the toolbar trigger (model menu / reasoning-effort select). No new selection UI — reuse the existing one, same as Ctrl+M does today.
- Typing
/model (or /reasoning) as the whole input and pressing Enter does the same, instead of sending the literal text to the model.
- Both commands appear in the
/ panel with descriptions, so the autocomplete itself teaches users that model switching is one slash away.
A working implementation is already on a fork branch (passing typecheck / lint / unit tests): https://github.com/pinion05/ZCode/tree/slashtogui — summary of the approach:
- Parse layer:
/model & /reasoning become a local openConfigPicker command kind; commands carrying attachments still send as normal prompts.
- Delivery: a single reusable
V4ComposerUiRequest channel (requestId pattern, mirrors externalTextInsertRequest); the toolbar consumes it by calling the existing GUI handlers — the Ctrl+M openRequestKey path for the model menu, the controlled Select open for the thought menu. No second open path is introduced.
- Future slash→GUI actions (e.g. opening plugin menus) can extend the same action union instead of adding new request props; host-owned actions (like
/side) keep using the AppSlashCommand.run() pattern.
预期价值 · Expected value
- Keyboard-only users never leave the input to switch model / reasoning effort.
- The
/ autocomplete makes model switching discoverable (Ctrl+M is not).
- Fixes the surprising "typed
/model becomes prompt text" behavior.
- The reusable request channel lowers the cost of future slash-command-driven GUI affordances.
你认为的优先级 · Your perceived priority
中 · Medium
你使用的 ZCode 版本 / 环境 · ZCode version / environment
v3.14.3 / ZCode Desktop / macOS (arm64)
补充材料 · Additional context
- Implementation branch: https://github.com/pinion05/ZCode/tree/slashtogui (fork of zai-org/ZCode, branch
slashtogui, commit feat(ui): add /model and /reasoning slash commands to open composer config dropdowns)
- Verified: parser unit tests (5 cases),
pnpm typecheck, oxlint (0 errors), oxfmt, pnpm architecture:check --changed all pass. E2E not covered (no E2E infra in the public repo yet).
- Happy to open a PR to zai-org/ZCode if the direction looks good.
中文概要: 建议为 GUI 输入框增加 /model 与 /reasoning 本地斜杠命令:从 / 面板选中或直接输入回车,即可打开工具栏现有的模型选择 / 思考档位下拉(与 Ctrl+M、点击触发器同一入口,不新增第二条打开路径)。目前已在我的 fork 分支上完成实现并通过 typecheck / lint / 单测,方向确认后可提 PR。请求通道(V4ComposerUiRequest)设计为可复用,后续插件菜单等"斜杠命令打开 GUI"类功能可直接扩展,无需新增请求 prop。
提交前确认 · Pre-submission checklist
问题类别 · Category
模型设置 / 切换 · Model config / switching
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
使用场景 · Use case
When I'm deep in a keyboard flow (typing a prompt, queuing follow-ups), switching the model or reasoning effort today means reaching for the mouse to click the toolbar trigger, or remembering that Ctrl+M exists — which is undiscoverable. Worse: out of habit I sometimes type
/modelinto the chat input, and today that text is submitted verbatim as a prompt to the model instead of doing anything useful, which is surprising for a command-shaped input.Related but different from #646 (in-chat model switching UI) and #164 (exposing
/hooks//mcp//pluginscommands): what's missing is the simplest keyboard path — a slash command that opens the model / reasoning dropdowns that already exist in the composer.建议方案 · Proposal
Make
/modeland/reasoningfirst-class local commands in the GUI composer:/modelor/reasoningfrom the/autocomplete panel opens the same dropdown as clicking the toolbar trigger (model menu / reasoning-effort select). No new selection UI — reuse the existing one, same as Ctrl+M does today./model(or/reasoning) as the whole input and pressing Enter does the same, instead of sending the literal text to the model./panel with descriptions, so the autocomplete itself teaches users that model switching is one slash away.A working implementation is already on a fork branch (passing typecheck / lint / unit tests): https://github.com/pinion05/ZCode/tree/slashtogui — summary of the approach:
/model&/reasoningbecome a localopenConfigPickercommand kind; commands carrying attachments still send as normal prompts.V4ComposerUiRequestchannel (requestId pattern, mirrorsexternalTextInsertRequest); the toolbar consumes it by calling the existing GUI handlers — the Ctrl+MopenRequestKeypath for the model menu, the controlled Select open for the thought menu. No second open path is introduced./side) keep using theAppSlashCommand.run()pattern.预期价值 · Expected value
/autocomplete makes model switching discoverable (Ctrl+M is not)./modelbecomes prompt text" behavior.你认为的优先级 · Your perceived priority
中 · Medium
你使用的 ZCode 版本 / 环境 · ZCode version / environment
v3.14.3 / ZCode Desktop / macOS (arm64)
补充材料 · Additional context
slashtogui, commitfeat(ui): add /model and /reasoning slash commands to open composer config dropdowns)pnpm typecheck,oxlint(0 errors),oxfmt,pnpm architecture:check --changedall pass. E2E not covered (no E2E infra in the public repo yet).中文概要: 建议为 GUI 输入框增加
/model与/reasoning本地斜杠命令:从/面板选中或直接输入回车,即可打开工具栏现有的模型选择 / 思考档位下拉(与 Ctrl+M、点击触发器同一入口,不新增第二条打开路径)。目前已在我的 fork 分支上完成实现并通过 typecheck / lint / 单测,方向确认后可提 PR。请求通道(V4ComposerUiRequest)设计为可复用,后续插件菜单等"斜杠命令打开 GUI"类功能可直接扩展,无需新增请求 prop。