mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
refac: tools url param handling
This commit is contained in:
parent
9193c9bd7d
commit
57df49274c
@ -352,16 +352,22 @@
|
||||
webSearchEnabled = true;
|
||||
}
|
||||
|
||||
if ($page.url.searchParams.get('q')) {
|
||||
prompt = $page.url.searchParams.get('q') ?? '';
|
||||
selectedToolIds = (
|
||||
$page.url.searchParams.get('tools') ??
|
||||
$page.url.searchParams.get('tool-ids') ??
|
||||
''
|
||||
)
|
||||
.split(',')
|
||||
if ($page.url.searchParams.get('tools')) {
|
||||
selectedToolIds = $page.url.searchParams
|
||||
.get('tools')
|
||||
?.split(',')
|
||||
.map((id) => id.trim())
|
||||
.filter((id) => id);
|
||||
} else if ($page.url.searchParams.get('tool-ids')) {
|
||||
selectedToolIds = $page.url.searchParams
|
||||
.get('tool-ids')
|
||||
?.split(',')
|
||||
.map((id) => id.trim())
|
||||
.filter((id) => id);
|
||||
}
|
||||
|
||||
if ($page.url.searchParams.get('q')) {
|
||||
prompt = $page.url.searchParams.get('q') ?? '';
|
||||
|
||||
if (prompt) {
|
||||
await tick();
|
||||
|
Loading…
Reference in New Issue
Block a user