fix: improve session initialization flow
- Fixed onMounted to properly set currentSession after creating default - Ensure loadSessions is called after createSession to refresh list
This commit is contained in:
@@ -607,12 +607,12 @@ onMounted(async () => {
|
||||
|
||||
// Auto-create default session if none exists
|
||||
if (!sessionList.value.length) {
|
||||
const defaultSession = await createSession('Default', 'keyword')
|
||||
if (defaultSession) {
|
||||
setCurrentSession(defaultSession)
|
||||
const newSession = await createSession('Default', 'keyword')
|
||||
if (newSession) {
|
||||
setCurrentSession(newSession)
|
||||
await loadSessions()
|
||||
}
|
||||
} else {
|
||||
await loadSessions()
|
||||
// Set first session as current
|
||||
if (sessionList.value.length && !currentSession.value) {
|
||||
setCurrentSession(sessionList.value[0])
|
||||
|
||||
Reference in New Issue
Block a user