From 7728e38318c89ee9555a5ec4e159a7b95b3f19d9 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 28 Feb 2026 23:15:54 -0500 Subject: [PATCH] Update summary.md for session: quick-capture, bug fixes, note picker Co-Authored-By: Claude Sonnet 4.6 --- summary.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/summary.md b/summary.md index 36174b8..a0a3300 100644 --- a/summary.md +++ b/summary.md @@ -12,7 +12,7 @@ > Include file-level details in the commit body when the change is non-trivial. ## Last Updated -2026-02-28 — Intent routing fixes (search_web over-triggering, prior-work fast-path), note picker → persistent context, intent model upgrade to qwen2.5:7b, default model setting fix +2026-02-28 — Quick-capture endpoint for Android/external clients; bug fixes: create_note list-title crash, AI Assist 400 error, note picker persistent context, intent routing ## Project Overview Fabled Assistant is a self-hosted note-taking and task-tracking application with @@ -277,6 +277,7 @@ fabledassistant/ │ │ ├── admin.py # /api/admin blueprint: backup, restore, user management, registration toggle, invitations, base URL, SMTP (admin only) │ │ ├── chat.py # /api/chat blueprint: conversations CRUD, SSE message streaming (all @login_required) │ │ ├── notes.py # /api/notes CRUD + wikilinks + backlinks + tag suggestions (all @login_required) +│ │ ├── quick_capture.py # /api/quick-capture POST — mobile/external single-shot item creation (session auth) │ │ ├── tasks.py # /api/tasks CRUD + PATCH status (all @login_required) │ │ └── settings.py # /api/settings GET/PUT, GET /models — per-user settings + installed model list (@login_required) │ ├── services/ @@ -668,6 +669,19 @@ When adding a new migration, follow these conventions: brainstorming requests, game design, writing help, or when the user references existing notes. Creative/ideation requests ("think of", "come up with", "brainstorm") always route to null (chat). `search_web` is only for genuinely new real-time facts not in the user's notes. +- **Quick-capture endpoint:** `POST /api/quick-capture` in `routes/quick_capture.py` (session auth via + cookie). Takes `{"text": "natural language string"}`, runs `classify_intent` filtered to creation-only + tools (`create_note`, `create_task`, `create_event`, `create_todo`), calls `execute_tool`, and returns + a single synchronous JSON response — no SSE, no conversation ID. Falls back to `create_note` if intent + is unclear or low-confidence. Response: `{"success", "type", "message", "data", "fallback?"}`. + Designed for Android/mobile quick-capture use case. Auth: session cookie from `POST /api/auth/login`. +- **Bug fixes (this session):** + - `create_note`/`create_task` list-title crash: `execute_tool` now validates `title` is a string and + returns a structured error so the model self-corrects with individual calls (vs. crashing asyncpg). + - AI Assist panel 400 errors: `routes/notes.py` assist route was missing `or Config.OLLAMA_MODEL` + safety net — empty `default_model` DB value was passed to Ollama as-is, causing 400. + - Note picker → persistent context: paperclip attachment now calls `includeNote()` directly + (persistent `includedNotes`) instead of the one-shot `attachedNote` pattern. - **Default model setting fix:** `delete_setting()` added to `services/settings.py` — saving an empty model value in Settings now deletes the DB row rather than storing `""`, so `get_setting()` falls back to the `Config` default. Safety net `or Config.OLLAMA_MODEL` guards added in `routes/chat.py`