Repository navigation
feat(ai): send the Bob prompt with Enter - #1006
Merged
Merged
Conversation
Enter sends the prompt and Shift+Enter adds a new line. Before, only Cmd+Enter or Ctrl+Enter sent it. Enter does nothing while an input method composes a word, so Chinese, Japanese and Korean users can pick a word without sending a half-typed prompt. The "/" command menu still gets the key first. Co-Authored-By: Claude <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1006 +/- ##
===========================================
+ Coverage 81.01% 81.04% +0.03%
===========================================
Files 66 66
Lines 7137 7139 +2
===========================================
+ Hits 5782 5786 +4
+ Misses 1355 1353 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The manual key checks become the declarative modifier. .exact skips Enter when any other system modifier is held, so Shift+Enter keeps the textarea default (newline) with no handler of its own, and Cmd+Enter / Ctrl+Enter still send. isComposing stays in the handler: no modifier covers an IME composition, and the Enter that picks a candidate arrives as key "Enter" with no modifiers held, so .exact alone would send half-typed prompts from dead keys, mobile keyboards and CJK input.
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.
In the Bob AI panel, Enter now sends the prompt and Shift+Enter adds a new line. Before, only Cmd+Enter or Ctrl+Enter sent it.
Enterinstead ofMod+Enter.Testing
Checked in the editor with Playwright: Enter in an empty prompt adds no new line, and Shift+Enter between two words gives two lines.