-
Notifications
You must be signed in to change notification settings - Fork 19
feat: schedule task on text prompt input submit event #222
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm. Now we need to let the user know that CTRL+enter can be used to submit the form in text fields. @jancborchardt @nimishavijay Any suggestion on where to mention that?
For context, here is the view we are talking about:
bc81a20
to
922d9f8
Compare
Well, my first question was to ask what was answered in the issue -- why are we not using enter? Seems like the most obvious key here, especially since it is used in the chat too. If it is possible to override the component restrictions on using enter then I'd go for that, otherwise what do you think of right next to the send button? It can be hidden on mobile since ctrl is not a thing there anyway. Something like this: Also keep in mind for macOS it would be Cmd+Enter |
My initial thought was that for some tasks such as summarize, the prompt is expected to be a multi-line article, so it would make more sense to use Enter to create a new line rather than submit the prompt (which is the case for text boxes with the |
I have no strong opinion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @nimishavijay said (and was originally specified?), we need to go for Enter as submit key here:
- It’s a well-known submit key, especially for a single-line input we have here
- Brief test with ChatGPT and Mistral: Enter submits, Shift-Enter newline, so people are used to this. (They don’t even have hints for how to do newlines there)
@jancborchardt Done in 02a5fce, unless you wanted to also provide a hint to the user that Shift+Enter adds a new line? |
I'm voting to have the hint and would put it under the input field. Works good! Does this translate to mobile, so does this mean there is no way to have a new line on mobile? I have no mobile setup to test it unfortunately |
@jancborchardt @nimishavijay What do you think about this? I think having the hint next to the box it's used on makes sense too, but it might result in duplicate hints if there is more than one input text field (e.g. context write, perhaps).
I tried it on the daily instance with the chat task and the Enter key on mobile does indeed submit the task too. Maybe we should make the |
02a5fce
to
828d0e6
Compare
I copied the |
I'm not sure why we are discussing about mobile. I don't require mobile to function for this change to be merged. |
I would prefer to not break the possibility of adding multiline text into the task type on mobile devices (in a browser, not talking about clients here). |
This enables the Ctrl+Enter shortcut to submit a prompt in the text input field to the AI. Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
828d0e6
to
966823c
Compare
Resolves #210. This enables the Ctrl+Enter shortcut to submit a prompt in the text input field to the AI.