* 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>
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) {
}
chatStore.clearActiveConversation();
+
+ if (qParam !== null) {
+ await chatStore.createConversation();
+ await chatStore.sendMessage(qParam);
+ }
});
</script>