Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/server/webui/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
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) {
await chatStore.initialize();
}

chatStore.clearActiveConversation();

if (qParam !== null) {
await chatStore.createConversation();
await chatStore.sendMessage(qParam);
}
});
</script>

Expand Down