mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-02-06 00:20:34 +01:00
parent
1d1e6a90bc
commit
b3451785ac
Binary file not shown.
@ -468,14 +468,9 @@ const mainApp = createApp({
|
|||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
},
|
},
|
||||||
async sendMessage() {
|
async sendMessage() {
|
||||||
if (!this.inputMsg) return;
|
// 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.isGenerating) {
|
if (!this.inputMsg || this.isGenerating) return;
|
||||||
this.stopGeneration();
|
|
||||||
while (this.isGenerating) {
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const currConvId = this.viewingConvId;
|
const currConvId = this.viewingConvId;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user