Skip to content

[建议 / Feature] Add /model and /reasoning slash commands that open the model & reasoning-effort dropdowns #903

Description

@pinion05

提交前确认 · Pre-submission checklist

  • 我已搜索过现有 issue,确认这不是重复建议 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.

问题类别 · 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:

  1. 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.
  2. Typing /model (or /reasoning) as the whole input and pressing Enter does the same, instead of sending the literal text to the model.
  3. 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。

Activity

  1. github-actions commented on Oct 2, 2026

    @github-actions

    👋 感谢你的反馈,我们已经收到。

    • 维护者看到后会尽快回复你。
    • 状态保持为 status: 待评估,你可以随时补充信息。
    • 信息不全时我们会打上 needs: 更多信息 标签并 @ 你。

    👋 Thanks — we've received your issue.

    • A maintainer will get back to you as soon as we can.
    • Status stays at status: 待评估 (Triage); feel free to add context.
    • If we need more details, we'll add needs: 更多信息 and ping you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions