Conversation
…message submit After submitting a message, the input field is cleared with a zero-width space (\u200B) to maintain contentEditable height. When the user then types "/", the DOM content becomes "\u200B/" and the trigger character lands at position 1 instead of 0. The word boundary check only recognized regular space and newline, so the zero-width space was rejected as an invalid boundary — preventing the completion popup from appearing. Add \u200B to the valid word boundary characters so "/" and "@" triggers work correctly after message submission without requiring an extra backspace. Closes #3592
…stant Replace scattered `\u200B` magic strings with a shared `ZERO_WIDTH_SPACE` constant and `stripZeroWidthSpaces()` helper exported from @qwen-code/webui. This also improves the slash command completion fix: instead of adding \u200B to the word boundary check, strip it at the source in handleInput (consistent with InputForm's onInput handler) and clamp the cursor position to the stripped text length. Closes #3592
- Add unit tests for ZERO_WIDTH_SPACE constant and stripZeroWidthSpaces helper (via @qwen-code/webui import) - Add shouldSendMessage tests covering empty, whitespace, zero-width space, and attachment scenarios - Add parseExportSlashCommand tests for zero-width space input
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Fix CI lint failure by providing all required ImageAttachment fields (id, name, type, size, data, timestamp) instead of non-existent mediaType property.
wenshao
approved these changes
Apr 25, 2026
Collaborator
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — gpt-5.5 via Qwen Code /review
This was referenced Apr 26, 2026
This was referenced Apr 27, 2026
Bojun-Vvibe
added a commit
to Bojun-Vvibe/oss-contributions
that referenced
this pull request
Apr 30, 2026
- BerriAI/litellm#26843 (merge-after-nits) — invite-link onboarding token hardening - google-gemini/gemini-cli#26067 (merge-after-nits) — JetBrains alt-buffer respects user setting - QwenLM/qwen-code#3622 (merge-as-is) — rewind E2E assertion update post isRealUserTurn - QwenLM/qwen-code#3609 (merge-after-nits) — zero-width-space placeholder unification - aaif-goose/goose#8796 (merge-as-is) — newSession _meta wire-protocol field rename
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/不触发斜杠命令补全的问题\u200B魔法字符串提取为ZERO_WIDTH_SPACE常量和stripZeroWidthSpaces()helperRoot Cause
发送消息后,输入框通过
textContent = '\u200B'(零宽空格)清空以维持 contentEditable 高度。当用户再次输入/时,DOM 内容为'\u200B/',useCompletionTrigger的词边界检查不认识零宽空格,导致触发器被拒绝。Fix
useCompletionTrigger的handleInput中用stripZeroWidthSpaces()在源头清理文本(与InputForm的onInput保持一致),并 clamp 光标位置防止偏移ZERO_WIDTH_SPACE常量和stripZeroWidthSpaces()helper 到@qwen-code/webui,替换vscode-ide-companion和webui中所有\u200B魔法字符串引用Test plan
/能正常触发补全Closes #3592