]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
webui: support q URL parameter (#16728)
authorFlorian Badie <redacted>
Fri, 24 Oct 2025 12:10:29 +0000 (14:10 +0200)
committerGitHub <redacted>
Fri, 24 Oct 2025 12:10:29 +0000 (14:10 +0200)
* webui: support q URL parameter

Fixes #16722
I’ve checked that it works with Firefox’s AI tools

* webui: apply suggestions from code review

Co-authored-by: Aleksander Grygier <redacted>
* chore: update webui static build

---------

Co-authored-by: Aleksander Grygier <redacted>
tools/server/public/index.html.gz
tools/server/webui/src/routes/+page.svelte

index 7b56d87e430ea9b96df1b22b2b1432f639333e09..026b53b28632fb82031333a4ef411444cdabddb2 100644 (file)
Binary files a/tools/server/public/index.html.gz and b/tools/server/public/index.html.gz differ
index 2cd2d5c37313a52b223bf140327b41cdee7969a9..cd18dabccb9dee2300f9322ed630690368be70da 100644 (file)
@@ -2,6 +2,9 @@
        import { ChatScreen } from '$lib/components/app';
        import { chatStore, isInitialized } from '$lib/stores/chat.svelte';
        import { onMount } from 'svelte';
+       import { page } from '$app/state';
+
+       let qParam = $derived(page.url.searchParams.get('q'));
 
        onMount(async () => {
                if (!isInitialized) {
@@ -9,6 +12,11 @@
                }
 
                chatStore.clearActiveConversation();
+
+               if (qParam !== null) {
+                       await chatStore.createConversation();
+                       await chatStore.sendMessage(qParam);
+               }
        });
 </script>