fix: keep forced index modal open on generation failure

Move auto-close logic from finally to success path so the modal
remains open for retry when generate() fails in force mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
diguaandClaude Sonnet 4.6 authored and digua committed 2026-05-23 16:28:50 +08:00
1 parent 53e0d21ec7
commit fa123bab49
1 file changed
+2 -2
@@ -97,12 +97,12 @@ async function generateSessionIndex() {
hasIndex.value = true
sessionCount.value = count
emit('generated', count)
forceMode.value = false
isOpen.value = false
} catch (error) {
console.error('生成会话索引失败:', error)
} finally {
isGenerating.value = false
forceMode.value = false
isOpen.value = false
}
}