Skip to content

Commit b345178

Browse files
authored
server : (webui) revert hacky solution from #11626 (#11634)
1 parent 1d1e6a9 commit b345178

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

examples/server/public/index.html.gz

-47 Bytes
Binary file not shown.

examples/server/webui/src/main.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -468,14 +468,9 @@ const mainApp = createApp({
468468
URL.revokeObjectURL(url);
469469
},
470470
async sendMessage() {
471-
if (!this.inputMsg) return;
472-
473-
if (this.isGenerating) {
474-
this.stopGeneration();
475-
while (this.isGenerating) {
476-
await new Promise((resolve) => setTimeout(resolve, 10));
477-
}
478-
}
471+
// prevent sending empty message
472+
// also allow typing the message while generating, but does not allow sending it (to match UX/UI behavior of other chat apps)
473+
if (!this.inputMsg || this.isGenerating) return;
479474

480475
const currConvId = this.viewingConvId;
481476

0 commit comments

Comments
 (0)