Skip to content

Commit 69e9ff0

Browse files
odrlingallozaur
andauthored
webui: support q URL parameter (ggml-org#16728)
* webui: support q URL parameter Fixes ggml-org#16722 I’ve checked that it works with Firefox’s AI tools * webui: apply suggestions from code review Co-authored-by: Aleksander Grygier <[email protected]> * chore: update webui static build --------- Co-authored-by: Aleksander Grygier <[email protected]>
1 parent 5a91109 commit 69e9ff0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tools/server/public/index.html.gz

69 Bytes
Binary file not shown.

tools/server/webui/src/routes/+page.svelte

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22
import { ChatScreen } from '$lib/components/app';
33
import { chatStore, isInitialized } from '$lib/stores/chat.svelte';
44
import { onMount } from 'svelte';
5+
import { page } from '$app/state';
6+
7+
let qParam = $derived(page.url.searchParams.get('q'));
58
69
onMount(async () => {
710
if (!isInitialized) {
811
await chatStore.initialize();
912
}
1013
1114
chatStore.clearActiveConversation();
15+
16+
if (qParam !== null) {
17+
await chatStore.createConversation();
18+
await chatStore.sendMessage(qParam);
19+
}
1220
});
1321
</script>
1422

0 commit comments

Comments
 (0)