diff --git a/interface/web/src/App.jsx b/interface/web/src/App.jsx index 45e8637..e2c39e3 100644 --- a/interface/web/src/App.jsx +++ b/interface/web/src/App.jsx @@ -154,6 +154,21 @@ function App() { } }; + // Bulk delete of everything currently listed (respects the search filter). + const clearConversations = async () => { + const n = conversations.length; + if (!n) return; + const what = search ? `${n} matching conversation${n > 1 ? "s" : ""}` : `all ${n} conversation${n > 1 ? "s" : ""}`; + if (!window.confirm(`Delete ${what}? This cannot be undone.`)) return; + const ids = conversations.map(c => c.id); + await Promise.all( + ids.map(id => fetch(`${API_BASE}/conversations/${id}`, { method: "DELETE" }).catch(err => + console.error("Failed to delete conversation:", err))) + ); + if (ids.includes(activeConversationId)) setActiveConversationId(crypto.randomUUID()); + loadConversations(search); + }; + const navItems = [ { key: "chatbot", icon: "đź’¬", label: "Chat" }, { key: "playbook", icon: "đź“–", label: "Playbooks" }, @@ -168,7 +183,7 @@ function App() {
{/* Sidebar */}
)} - {/* Manual AI start/stop — Ollama is off until the user turns it on */} - + {/* Start/Stop AI moved onto the status dot above — click it to toggle. */}