feat: Add shift-click to append suggestions to text area #2081
+80
−9
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.
When a user shift-clicks a suggestion, the text is now appended to the current text area content instead of being sent immediately. This allows users to:
The implementation passes the mouse event through the component chain and checks for the shift key before deciding whether to append or send the message.
Context
Implementation
Video Demo
https://www.loom.com/share/c691ff7dd266465b920a27cfcda3146e
How to Test
Get in Touch
Important
Shift-clicking a suggestion now appends it to the text area instead of sending it immediately, allowing for more flexible prompt building.
ChatRow: UpdatedonSuggestionClickto accept aReact.MouseEventand check forshiftKey.ChatView: ModifiedonSuggestionClickinitemContentto append text ifshiftKeyis pressed.FollowUpSuggest: UpdatedonSuggestionClickto passReact.MouseEventto handler.This description was created by
for 32ec09f7dd1dc55db84ed594ec1513d49b2b8310. It will automatically update as commits are pushed.