Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Adds config option to use ENTER to send message #164

Merged
merged 6 commits into from
May 17, 2023

Conversation

JasonWeill
Copy link
Collaborator

@JasonWeill JasonWeill commented May 11, 2023

Fixes #86.

Adds a config option to swap the uses of Shift+Enter and Enter: the user can choose the default of "Enter sends message" or the alternative of "Shift+Enter sends message":

image

In the default case, the caption says "Press Shift+Enter to add a new line":

Screen Shot 2023-05-11 at 4 36 27 PM

In the alternative case, the caption below the chat box is minimally modified from what you'd see today, "Press Shift+Enter to send message":

Screen Shot 2023-05-11 at 4 36 05 PM

Modifies documentation to mention the new default and that users can change the keybindings in the settings pane.

@JasonWeill JasonWeill added enhancement New feature or request @jupyter-ai/chatui labels May 11, 2023
dlqqq
dlqqq previously requested changes May 14, 2023
Copy link
Member

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

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

Thank you for this work! In addition to the small comment below, I do have one high-level question that I would like to raise: should we change the default from Shift + Enter to Enter? I recall earlier discussion where we had been planning to do this for some time, since chat UIs typically use Enter to send, in contrast to ours.

packages/jupyter-ai/src/components/chat.tsx Outdated Show resolved Hide resolved
@ellisonbg
Copy link
Contributor

I am fine changing the default to Enter.

@JasonWeill JasonWeill marked this pull request as draft May 16, 2023 15:44
@JasonWeill JasonWeill marked this pull request as ready for review May 16, 2023 17:47
@JasonWeill
Copy link
Collaborator Author

Thank you for this work! In addition to the small comment below, I do have one high-level question that I would like to raise: should we change the default from Shift + Enter to Enter? I recall earlier discussion where we had been planning to do this for some time, since chat UIs typically use Enter to send, in contrast to ours.

Per conversation with @ellisonbg , I changed the default to Enter.

@dlqqq dlqqq merged commit 1555afd into jupyterlab:main May 17, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Adds new config option to swap enter, shift+enter behavior

* Updates input, docs

* Moves helperText down; removes debug stmts

* Combines effects

* Sets default behavior to "ENTER sends message"

* Change the order to put the new default on top
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* Adds new config option to swap enter, shift+enter behavior

* Updates input, docs

* Moves helperText down; removes debug stmts

* Combines effects

* Sets default behavior to "ENTER sends message"

* Change the order to put the new default on top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/chatui
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting to toggle ENTER, SHIFT+ENTER shortcuts in chat UI
3 participants