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

Keyboard sends empty messages when input is empty #118

Closed
dlqqq opened this issue Dec 9, 2024 · 0 comments · Fixed by #126
Closed

Keyboard sends empty messages when input is empty #118

dlqqq opened this issue Dec 9, 2024 · 0 comments · Fixed by #126
Labels
bug Something isn't working

Comments

@dlqqq
Copy link
Member

dlqqq commented Dec 9, 2024

Description

Pressing Enter/Shift-Enter sends empty messages when input is empty, despite the "Send" button being disabled.

Reproduce

On v3-dev branch of Jupyter AI, press Enter/Shift-Enter repeatedly while the input is empty.

Screen.Recording.2024-12-09.at.1.49.35.PM.mov

Expected behavior

  • Enter/Shift-Enter should not send a message when the input is empty.
  • When Enter/Shift-Enter is pressed:
    • Determine the message is all whitespace via regex, and if so, clear the input & do nothing else.
    • Otherwise, send the message.
    • The send button should be enabled/disabled according to this state. There should not be 2 separate state vars that control whether the send button is enabled & control whether the input should be sent.
@dlqqq dlqqq added the bug Something isn't working label Dec 9, 2024
@dlqqq dlqqq added this to the Jupyter AI v3.0.0a0 milestone Dec 9, 2024
@dlqqq dlqqq changed the title Pressing Enter/Shift-Enter sends empty messages when input is empty Keyboard sends empty messages when input is empty Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant