mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 13:55:19 +00:00
refac: message input optimization
This commit is contained in:
parent
ac375fe3d2
commit
e1386fe80b
1 changed files with 7 additions and 2 deletions
|
|
@ -226,12 +226,17 @@
|
||||||
const chatInput = document.getElementById('chat-input');
|
const chatInput = document.getElementById('chat-input');
|
||||||
|
|
||||||
if (chatInput) {
|
if (chatInput) {
|
||||||
text = await textVariableHandler(text || '');
|
if (text !== '') {
|
||||||
|
text = await textVariableHandler(text || '');
|
||||||
|
}
|
||||||
|
|
||||||
chatInputElement?.setText(text);
|
chatInputElement?.setText(text);
|
||||||
chatInputElement?.focus();
|
chatInputElement?.focus();
|
||||||
|
|
||||||
text = await inputVariableHandler(text);
|
if (text !== '') {
|
||||||
|
text = await inputVariableHandler(text);
|
||||||
|
}
|
||||||
|
|
||||||
await tick();
|
await tick();
|
||||||
if (cb) await cb(text);
|
if (cb) await cb(text);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue