fix: loadSessions variable shadowing bug
- Local variable 'sessions' was shadowing the ref 'sessions' - sessions.value = sessions was not updating the ref - Renamed local variable to 'sessionList' and properly assign to sessions.value - This fixes sessions not appearing in history list after save
This commit is contained in:
@@ -765,7 +765,9 @@ async function saveCurrentSession() {
|
||||
|
||||
// Show rename dialog for session name
|
||||
if (currentSession.value) {
|
||||
renamingSession.value = currentSession.value
|
||||
// Ensure we're working with the session from the list
|
||||
const sessionFromList = sessionList.value.find(s => s.id === currentSession.value!.id)
|
||||
renamingSession.value = sessionFromList || currentSession.value
|
||||
renameValue.value = currentSession.value.title === '未命名' ? '' : currentSession.value.title
|
||||
nextTick(() => renameInputEl.value?.focus())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user