From 174fd0d4f327986b4bf001e25a797dda0b72ba38 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Thu, 19 Mar 2026 21:36:47 +0100 Subject: [PATCH] Update session deletion to clear chat library --- src/App.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/App.jsx b/src/App.jsx index 18f8f82..169aaf2 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1534,6 +1534,11 @@ async function createNewChat() { .then(() => { const newSessions = chatSessions.filter(s => s.session_id !== sessionId); setChatSessions(newSessions); + setChatLibraryBySession(prev => { + const next = { ...(prev || {}) } + delete next[sessionId] + return next + }) if (activeSessionId === sessionId) { setActiveSessionId(newSessions.length > 0 ? newSessions[0].session_id : null); }