qwen-code/packages
易良 23e76ff26d
fix(vscode-companion): fill slash commands into input on Enter instead of auto-submitting (#3618)
* fix(vscode-companion): fill slash commands into input on Enter instead of auto-submitting (#1990)

Previously, selecting any slash command from the VSCode completion menu
via Enter would immediately send it to the agent, giving users no chance
to append arguments. This was especially problematic for skills and
custom commands that accept parameters.

Changes:
- Commands that accept input (skills, commands with completion) now fill
  into the input box on Enter, letting users type arguments before
  submitting
- No-arg built-in commands (/clear, /doctor, etc.) still auto-submit
  on Enter for convenience
- Tab always fills without submitting (unchanged)
- Client-side commands (/auth, /account, /model) still execute
  immediately (unchanged)

The distinction is driven by the ACP `input` field: Session.ts now sets
`input: { hint }` for commands that accept arguments (non-BUILT_IN kind
or commands with completion functions), and `input: null` for the rest.

Also fixes:
- /auth + /login unified handling in useMessageSubmit.ts
- authCancelled message now clears waiting state (prevents input lockup)
- Stale /login comment updated to /auth in WebViewProvider.ts

Resolves #1990

* fix(acp): derive input field from argumentHint and subCommands, not just kind+completion

The previous logic only checked `kind !== BUILT_IN || completion != null`
to decide whether a command accepts arguments. This caused built-in
commands like /bug, /context, /export, /language, and /stats to be
marked as no-input (auto-submit on Enter), even though they accept
meaningful arguments or have subcommands.

Now a command is considered to accept input when any of:
- it is not a BUILT_IN command
- it has a completion function
- it declares an argumentHint
- it has subCommands

Also adds argumentHint to /bug since it accepts a description but has
neither completion nor subCommands.

* fix(vscode-companion): strip U+200B from completion insertion path

The contentEditable input uses U+200B as a height placeholder. When
selecting a completion item, the raw textContent was used directly for
computing trigger position and building the new text, which could
preserve the hidden character and produce text like "\u200B/commit"
that downstream slash-command handling may not recognize.

Now strip zero-width spaces from the text before computing cursor
position and trigger offsets, and adjust the cursor for any removed
characters so the final inserted text is placeholder-free.

* fix(vscode-companion): add stripZeroWidthSpaces to @qwen-code/webui mock in App.test.tsx

The test mock for @qwen-code/webui was missing the newly imported
stripZeroWidthSpaces function, causing 4 test failures in CI.
2026-04-30 15:24:47 +08:00
..
channels fix(vscode-companion): fill slash commands into input on Enter instead of auto-submitting (#3618) 2026-04-30 15:24:47 +08:00
cli fix(vscode-companion): fill slash commands into input on Enter instead of auto-submitting (#3618) 2026-04-30 15:24:47 +08:00
core fix(lsp): 修复 LSP 文档、isPathSafe 限制,并提升 LSP 工具调用率 (#3615) 2026-04-30 15:24:18 +08:00
sdk-java fix(sdk-java): pass custom env to CLI process (#3543) 2026-04-24 10:37:52 +08:00
sdk-python feat(SDK) Add Python SDK implementation for #3010 (#3494) 2026-04-25 07:02:58 +08:00
sdk-typescript chore(release): sdk-typescript v0.1.7 (#3688) 2026-04-28 14:59:13 +08:00
vscode-ide-companion fix(vscode-companion): fill slash commands into input on Enter instead of auto-submitting (#3618) 2026-04-30 15:24:47 +08:00
web-templates chore(release): bump version to 0.15.3 (#3708) 2026-04-28 21:04:52 +08:00
webui chore(release): bump version to 0.15.3 (#3708) 2026-04-28 21:04:52 +08:00
zed-extension chore(zed-extension): update package version to 0.10.0 2026-02-06 14:26:01 +08:00