Skip to content

Commit d699f2e

Browse files
ngxsonmglambda
authored andcommitted
server : (webui) revert hacky solution from ggml-org#11626 (ggml-org#11634)
1 parent e00a986 commit d699f2e

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)