Skip to content

server : (webui) revert hacky solution from #11626 #11634

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

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified examples/server/public/index.html.gz
Binary file not shown.
11 changes: 3 additions & 8 deletions examples/server/webui/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,14 +468,9 @@ const mainApp = createApp({
URL.revokeObjectURL(url);
},
async sendMessage() {
if (!this.inputMsg) return;

if (this.isGenerating) {
this.stopGeneration();
while (this.isGenerating) {
await new Promise((resolve) => setTimeout(resolve, 10));
}
}
// prevent sending empty message
// also allow typing the message while generating, but does not allow sending it (to match UX/UI behavior of other chat apps)
if (!this.inputMsg || this.isGenerating) return;

const currConvId = this.viewingConvId;

Expand Down