Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix: IME causes multiple messages on Enter (Fixes #2272) #2274

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

lincheoll
Copy link
Contributor

Relates to

Fixes #2272

Risks

Low:

  • This change only affects the onKeyDown event handling logic in chat.tsx.
  • It has been confirmed to work correctly even in non-IME environments.

Background

What does this PR do?

This PR resolves an issue where using an Input Method Editor (IME) for languages like Korean, Japanese, or Chinese would cause multiple messages to be sent when pressing Enter. Now, pressing Enter after input will only send the message once.

What kind of change is this?

Bug fix:

  • Modified the onKeyDown event handling logic in chat.tsx to properly handle IME input and ensure a single message is sent.

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

  • Review the onKeyDown event handling logic in the chat.tsx file.

Detailed testing steps

  1. Launch the application.
  2. Enable an IME (e.g., Korean).
  3. Type text into the chat input field.
  4. Press Enter after typing:
    • Verify: The message is sent only once.

Deploy Notes

No special deployment instructions are needed. Follow standard build and deployment processes.

Database changes

None.

Deployment instructions

Standard deployment process

Discord username

lincheol

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi @lincheoll! Welcome to the elizaOS community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now an elizaOS contributor!

@tcm390 tcm390 merged commit 432fbca into elizaOS:develop Jan 14, 2025
3 checks passed
@lincheoll lincheoll deleted the 2272--fix-ime-multiple-messages branch January 21, 2025 06:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chat Input Sends Multiple Messages When Using IME
2 participants