Skip to content

Agent Customizations: leave Enter to an IME that is still composing - #350935

Open
wonjang (wonjangcloud9) wants to merge 1 commit into
microsoft:mainfrom
wonjangcloud9:fix/customize-agent-input-ime
Open

wonjang (wonjangcloud9) wants to merge 1 commit into
microsoft:mainfrom
wonjangcloud9:fix/customize-agent-input-ime

Conversation

@wonjangcloud9

Copy link
Copy Markdown

Fixes #350934

The input on the Agent Customizations welcome page submits on every Enter keydown. With a Japanese, Chinese or Korean IME, Enter is also how a composition is confirmed or finished, and that keydown arrives with isComposing: 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.ts and mobileRepositoryPicker.ts skip it. A plain Enter submits as before.

Test: aiCustomizationWelcomePagePromptLaunchers.test.ts gets 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 call prefillChat, 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

Fixes microsoft#350934

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 29, 2026 00:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 isComposing is true or keyCode is 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agent Customizations welcome input sends the prompt on the Enter that finishes an IME composition

2 participants