Repository navigation
Agent Customizations: leave Enter to an IME that is still composing - #350935
Open
wonjang (wonjangcloud9) wants to merge 1 commit into
Open
wonjang (wonjangcloud9) wants to merge 1 commit into
wonjang (wonjangcloud9) wants to merge 1 commit into
Conversation
Fixes microsoft#350934 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change preventing Enter submission during IME composition.
No open issues 🎉
What changed in this PR
Addresses #350934 by preventing Enter from submitting the Agent Customizations welcome input while an IME composition is active.
Changes:
- Ignore Enter when
isComposingis true orkeyCodeis 229, while preserving normal Enter submission. - Add regression coverage for both composition signals, unchanged input text, and subsequent submission.
No actionable findings. Reported validation used a DOM shim; full-app testing with a real IME remains unverified.
| File | Description |
|---|---|
src/vs/workbench/contrib/chat/test/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.test.ts |
Tests composing Enter events and normal submission. |
src/vs/workbench/contrib/chat/browser/aiCustomization/aiCustomizationWelcomePagePromptLaunchers.ts |
Adds the IME guard before handling Enter as submission. |
Review effort: Balanced
This branch has not been deployed
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.
Fixes #350934
The input on the Agent Customizations welcome page submits on every
Enterkeydown. With a Japanese, Chinese or Korean IME, Enter is also how a composition is confirmed or finished, and thatkeydownarrives withisComposing: true/ keyCode 229. Today it sends the unfinished text to a new chat and clears the input.This returns early from the handler while a composition is active, the same way
tabbedActionListWidget.tsandmobileRepositoryPicker.tsskip it. A plain Enter submits as before.Test:
aiCustomizationWelcomePagePromptLaunchers.test.tsgets a case that sends the input a composing Enter (isComposing: true), the legacy form (keyCode: 229) and then a plain Enter. It checks that the first two leave the text in place and don't callprefillChat, and that the plain Enter submits once.Verification: I ran that test file on its own with a DOM shim (not a full build). The new case passes with the fix, and fails without it because the composing Enter already submits. I haven't run the full app with a real IME.
🤖 Generated with Claude Code