From f509034fddbc6bd608ab6a30e423a41de395c23c Mon Sep 17 00:00:00 2001 From: jon Date: Thu, 23 Jul 2026 13:31:48 -0500 Subject: [PATCH] feat: playbook tools, RAG, vision, voice, chat controls, faster boot - Tool-using playbooks: read-only tool registry (search_memory, search_history, search_documents, list_models, get_time), per-playbook allowlist, agentic loop, and a "running tool" status indicator. - Document ingest / RAG: documents table + chunker + embed/cosine retrieval reusing the existing stack; Documents page (upload/paste, viewer, delete); top-k chunks injected into the system prompt. - Vision chat: attach images, base64 into /api/chat. - Voice I/O: Web Speech dictation + read-aloud (browser-native, no backend). - Chat controls: stop, regenerate, edit-and-resend; num_ctx knob in Settings. - Per-playbook model override. - History polish: per-conversation + bulk ShareGPT export. - Faster ncp start: UI up first, Ollama warms in the background, with a per-phase timing readout. Co-Authored-By: Claude Opus 4.8 --- interface/web/src/App.jsx | 76 ++++++++-- interface/web/src/Chatbot.jsx | 249 ++++++++++++++++++++++++++------ interface/web/src/Documents.jsx | 146 +++++++++++++++++++ interface/web/src/Playbook.jsx | 22 ++- interface/web/src/Settings.jsx | 21 +++ management/ncp.py | 31 ++-- synapse/chat.py | 56 ++++++- synapse/main.py | 131 ++++++++++++++--- synapse/memory/store.py | 118 +++++++++++++++ synapse/ollama_manager.py | 24 ++- synapse/playbooks/store.py | 6 + synapse/tools.py | 138 ++++++++++++++++++ tests/test_documents.py | 57 ++++++++ tests/test_smoke.py | 8 + tests/test_tools.py | 74 ++++++++++ 15 files changed, 1061 insertions(+), 96 deletions(-) create mode 100644 interface/web/src/Documents.jsx create mode 100644 synapse/tools.py create mode 100644 tests/test_documents.py create mode 100644 tests/test_tools.py diff --git a/interface/web/src/App.jsx b/interface/web/src/App.jsx index f96821d..25996d7 100644 --- a/interface/web/src/App.jsx +++ b/interface/web/src/App.jsx @@ -4,6 +4,7 @@ import { Playbook } from "./Playbook"; import { Models } from "./Models"; import { Settings } from "./Settings"; import { Memory } from "./Memory"; +import { Documents } from "./Documents"; import { Logs } from "./Logs"; import { API_BASE } from "./config"; @@ -128,6 +129,15 @@ function App() { } }; + // Download ShareGPT JSONL β€” one conversation if convId given, else all. + const exportConversations = (e, convId) => { + if (e) e.stopPropagation(); + const url = convId + ? `${API_BASE}/conversations/export?conversation_id=${encodeURIComponent(convId)}` + : `${API_BASE}/conversations/export`; + window.open(url, "_blank"); + }; + const deleteConversation = async (e, conversationId) => { e.stopPropagation(); if (!window.confirm("Delete this conversation?")) return; @@ -149,6 +159,7 @@ function App() { { key: "playbook", label: "πŸ“– Playbooks" }, { key: "models", label: "πŸ€– Models", badge: isModelPulling }, { key: "memory", label: "🧠 Memory" }, + { key: "documents", label: "πŸ“„ Documents" }, { key: "logs", label: "πŸ“œ Logs" }, { key: "settings", label: "βš™οΈ Settings" }, ]; @@ -295,21 +306,39 @@ function App() { }}>
Chats - +
+ + +
{isHover && ( <> +