-
Notifications
You must be signed in to change notification settings - Fork 13.7k
server : (webui) allow typing and submitting during llm response #11626
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
| if (this.isGenerating) { | ||
| this.stopGeneration(); | ||
| while (this.isGenerating) { | ||
| await new Promise((resolve) => setTimeout(resolve, 10)); |
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.
Hmm on second thought, this is a bad user experience. User have no visibility that the next message has already been queued and will be send as long as the generation is complete.
I will have to revert this.
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.
Right, I failed to consider queued completions. It would be nice, maybe in a future PR to still handle the stop+send when enter is pressed, which would be equivalent to clicking the Stop button and then clicking the Send button.
This pull request removes the disabled attribute on the textarea used for submitting responses and lets the user submit when they press enter, which stops a current llm response from continuing and inserts the user response after.
The Promise is just to wait for
generateMessageto finish and add its message withStorageUtils.appendMsg.This will close #11565