mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-21 22:55:16 +00:00
* fix(cli): improve slash command history feedback * fix(cli): centralize auxiliary model guard * test(cli): cover model picker left key * fix(cli): persist slash command invocation hiding across resume * fix: keep model picker feedback consistent * docs(cli): align design doc with /stats root-level hiding * fix(cli): preserve model picker history safely * fix: preserve hidden command feedback on resume * fix(desktop): match slash results to invocations * fix: keep slash command feedback paired with invocations - Record message-type command results through the recording wrapper so rejections and errors land in the result record and replay on resume - Move the NO_COLOR /theme rejection into the command action so the result record is written after the invocation, and keep that invocation visible because the command prints feedback instead of opening the dialog - Skip the /auth result record when the dialog auto-opened without an /auth invocation to pair with - Guard the model picker against re-entering a selection while a switch is already in flight - Walk only uuid -> parentUuid links when matching desktop slash results to invocations instead of retaining every parsed transcript record * fix(desktop): bound slash result lookup to user turn * test(cli): cover hidden command result replay on resume * fix(cli): guard dialog result recording * fix(cli,desktop): tighten slash-command feedback recording - Pin the revealed invocation as the first history item in the argument-validation reveal test, matching the processor's ordering. - Derive the /model picker-flag pattern from a single shared flag list. - Pair each transcript invocation with at most one result during desktop reconstruction, so a later same-name orphan result (e.g. an auto-fired recap) cannot re-emit an already-paired invocation's user row. - Retarget the textElements guard at the synthesized slash user row. * fix(cli): guard partially persisted model switches * test(cli): cover isPickerOnlyModelInvocation regex boundaries directly --------- Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com> Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com> Co-authored-by: Qwen Autofix <autofix@qwen-code.dev> Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com> Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2.2 KiB
2.2 KiB
Slash command history feedback
Problem
Interactive slash commands are added to the TUI history before their action is known. Commands that only open a dialog can therefore leave a bare invocation behind after the dialog closes. The model picker has the same problem when it is dismissed without a selection.
Design
- Do not add the built-in
/auth,/settings,/status,/help,/theme,/editor,/diff, or/statsinvocations to visible TUI history. Bare/effort,/model, and/statuslinepickers are hidden too. Their existing UI remains unchanged, as do chat recording and slash-command telemetry. User and project commands that override those names keep their invocation history. - Root matches apply to the bare command only; subcommands keep their
invocation because they perform work (for example
/status pathsprints session paths). - Resolve the command before adding its invocation so aliases use the canonical command name for this decision.
- Preserve invocations for commands that directly perform work, change session
state, write data, or enter a management/security workflow. Argument-sensitive
commands only hide their bare picker form; for example,
/effortis hidden while/effort highremains visible, and/modelis hidden while/model <id>remains visible. - Commands that fail before opening their dialog keep the invocation paired
with the failure message:
/themeunderNO_COLORis not hidden because it prints feedback instead of opening the picker, and a hidden picker-shaped/modelinvocation is revealed when its arguments are rejected. - Record the hiding decision in the chat record (
hiddenInvocation) so/resume,/branch, and session previews reconstruct the same history the live session displayed instead of bringing the bare invocation row back. - When the primary model picker is dismissed without a selection, add an info message identifying the unchanged model. Successful selections keep their existing feedback. The other pickers leave no trace when dismissed; the model picker states the outcome explicitly because the active model is session-critical and otherwise invisible in history, so a silent close would leave it ambiguous whether the model changed.