mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-11 22:52:54 +00:00
refac
This commit is contained in:
parent
3808eace6c
commit
a23b579233
1 changed files with 8 additions and 11 deletions
|
|
@ -2207,23 +2207,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
if (query || eventFiles?.length) {
|
||||
if (query) {
|
||||
await messageInput?.setText(query);
|
||||
}
|
||||
if (query) {
|
||||
messageInput?.setText(query, () => submitHandler(prompt));
|
||||
} else if (eventFiles?.length) {
|
||||
await tick();
|
||||
submitHandler(query || '');
|
||||
submitHandler('');
|
||||
}
|
||||
}
|
||||
} else if ($page.url.searchParams.get('q')) {
|
||||
const q = $page.url.searchParams.get('q') ?? '';
|
||||
await messageInput?.setText(q);
|
||||
|
||||
if (q) {
|
||||
if (($page.url.searchParams.get('submit') ?? 'true') === 'true') {
|
||||
await tick();
|
||||
submitHandler(q);
|
||||
}
|
||||
if (($page.url.searchParams.get('submit') ?? 'true') === 'true') {
|
||||
messageInput?.setText(q, () => submitHandler(prompt));
|
||||
} else {
|
||||
messageInput?.setText(q);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue