fix(desktop): render sidebar after importing sessions

loadSessions() only refreshes the data model; the sidebar DOM is drawn by
renderSessionList(). Imported sessions therefore only appeared after the
next render (e.g. sending a message). Call renderSessionList() right after.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
yiqi-017andClaude Opus 4.8 committed 2026-07-06 01:13:29 +08:00
1 parent 85d8c3c50e
commit 2f5515087f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1035,7 +1035,7 @@ async function importMemoryFromDir() {
+ `, ${t('sys.memorySessions')}: ${res.sessionsAdded || 0}`
+ (res.backupDir ? `\n${t('sys.memoryImportBackup')}: ${res.backupDir}` : '');
if (res.sessionsAdded) {
try { await loadSessions(); } catch (_) {}
try { await loadSessions(); renderSessionList(); } catch (_) {}
}
showChanToast(t('sys.memoryImported'), detail, 'ok');
}
+1 -1
View File
@@ -678,6 +678,6 @@
<!-- highlight.js -->
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js" crossorigin="anonymous"></script>
<script src="phosphor-icons.js?v=2"></script>
<script src="app.js?v=211"></script>
<script src="app.js?v=212"></script>
</body>
</html>