fix(#3874): auto-refresh sidebar session list after new session creation

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nankingjing
2026-07-05 18:43:20 +08:00
parent 8dc47b83c0
commit 8fc3179a8a
+2 -1
View File
@@ -1242,7 +1242,8 @@ async function newSession(flash, options={}){
const _dirP=loadDir('.');
if(_dirP&&typeof _dirP.catch==='function') _dirP.catch(()=>{});
}
// don't call renderSessionList here - callers do it when needed
// Refresh sidebar to include the newly created session (#3874).
if(typeof refreshSessionList==='function'){Promise.resolve(refreshSessionList('new-session')).catch(()=>{})}
})();
try{
return await _newSessionInFlight;