diff --git a/web/src/lib/components/chat/DropdownGroup.svelte b/web/src/lib/components/chat/DropdownGroup.svelte index f2385002..c2b4cda7 100644 --- a/web/src/lib/components/chat/DropdownGroup.svelte +++ b/web/src/lib/components/chat/DropdownGroup.svelte @@ -12,14 +12,9 @@ import { sessionAPI, sessions } from '$lib/store/session-store'; import { onMount } from 'svelte'; - let sessionInput = $currentSession || ''; + let sessionInput = ''; let sessionsList: string[] = []; - // Sync sessionInput with currentSession store - $: if ($currentSession !== sessionInput) { - sessionInput = $currentSession || ''; - } - // Update sessions list when sessions store changes $: if ($sessions) { sessionsList = $sessions.map(s => s.Name); @@ -69,6 +64,7 @@ onMount(() => { fetchStrategies(); sessionAPI.loadSessions(); + sessionInput = $currentSession || ''; }); @@ -104,28 +100,26 @@
-
- e.key === 'Enter' && handleSessionInput()} - placeholder="Enter or select session..." - class="flex-1 px-3 py-2 text-sm bg-primary-800/30 border-none rounded-md hover:bg-primary-800/40 transition-colors text-white placeholder-white/50 focus:ring-1 focus:ring-white/20 focus:outline-none" - /> - {#if sessionsList.length > 0} - - {/if} -
+ e.key === 'Enter' && handleSessionInput()} + placeholder="Enter session name..." + class="w-full px-3 py-2 text-sm bg-primary-800/30 border-none rounded-md hover:bg-primary-800/40 transition-colors text-white placeholder-white/50 focus:ring-1 focus:ring-white/20 focus:outline-none" + /> + {#if sessionsList.length > 0} + + {/if}