[建议 / Feature] Enter=排队 / queue, Ctrl+Enter=引导 / steer (对齐 Codex 行为)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复提议 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
UI / 界面体验 · UI / UX
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
使用场景 · Use case
When a ZCode Agent turn is running, I often want to send two different kinds of follow-up:
- A queued message — "answer/continue this after the current turn" (today's default Enter behavior).
- A steer / guide — "inject this into the running turn right now" (mid-flight course correction).
Today ZCode only exposes queue-vs-steer as a global setting (zcodeInteractionBehavior: "queue" | "guide" in setting.json, default "queue"). So I'm forced to pick ONE mode globally. To steer even once I have to flip the global setting, which then changes behavior for every subsequent message and is awkward to toggle mid-flow.
Frustrating part: the choice should be per-message, not global. In Codex I pick at send time with a modifier key — queue normally, steer occasionally — without leaving the keyboard or touching settings.
建议方案 · Proposal
Match Codex's chat-input behavior for steering a running turn:
- Enter → queue the message (delivered when the current turn ends) — i.e. today's default
session/send. - Ctrl+Enter (Cmd+Enter on macOS) → steer / guide (injected live into the running turn) —
session/steer.
The protocol plumbing for steer already exists in 3.2.5:
- JSON-RPC method
session/steer, - events
turn.steerQueued/turn.steerDrained, - client
steerSession()already returnskind:"queued".
But the task facade currently returns {kind:"unsupported", message:"ZCode Protocol steering is not wired yet."}, and the main composer's onKeyDown only handles Escape — there is no Ctrl+Enter path to session/steer (and Ctrl+Enter isn't in the registered shortcut set). So the ask is to wire that facade through to the composer and bind Ctrl+Enter to it, leaving Enter on session/send.
Keep the global zcodeInteractionBehavior setting as the default mode if desired — the modifier key would override it per-send, giving both behaviors without removing the setting.
预期价值 · Expected value
- Per-message control of queue-vs-steer without leaving the keyboard — no global toggle, no mode-switch friction.
- Parity with Codex (and broadly with how Claude Code / other agents handle live steering), lowering the switching cost for users coming from those tools. There's already visible demand for ZCode↔Codex/Claude-Code parity (e.g. open issue on GLM-5.2 output differences across agents).
- Unlocks a real workflow: let a long task keep running, queue follow-ups for after, but nudge it immediately with a steer when it goes off track — all from the same input box.
- Little UI surface: it's a keybinding on an already-existing protocol, not a new panel or setting screen.
你认为的优先级 · Your perceived priority
None
你使用的 ZCode 版本 / 环境 · ZCode version / environment
ZCode 3.2.5 (desktop / Electron), Windows 11 10.0.26200, GLM-5.2 (builtin:bigmodel-coding-plan)
补充材料 · Additional context
Reference: OpenAI Codex CLI chat input — Enter queues the message; Ctrl+Enter sends it as a steer.
Evidence from the ZCode 3.2.5 bundle (app.asar, read-only inspection):
- Protocol has steer:
session/steer, eventsturn.steerQueued/turn.steerDrained,steerSession()→kind:"queued". - Task facade currently a stub:
steerPrompt()returns{kind:"unsupported", message:"ZCode Protocol steering is not wired yet."}. - Main composer
<form>:onSubmit→session/send;onKeyDownonly handles Escape. No Ctrl+Enter → steer path. - Registered Ctrl+X shortcuts: A,B,C,D,L,M,N,O,P,R,S,W,X,Y,Z — Ctrl+Enter is not among them.
- Global toggle only:
zcodeInteractionBehavior∈ {"queue","guide"}, default "queue".
Happy to attach logs / a screen recording on request (Export Logs from the app menu, or %USERPROFILE%.zcode\logs).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the task facade's steerPrompt() stub and the main composer's onKeyDown handler. Read the existing session/send and session/steer paths, the steerSession() client method, and the registered shortcut set. Done means Enter retains queue behavior while Ctrl+Enter steers the running turn, with the existing global setting still available as the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100