14 Commits

Author SHA1 Message Date
mehdikarimi55
d922928495 fix(logging): survive a failed log-file rotation instead of dropping records
Two processes (the CLI launcher and the uvicorn server) can install a
RotatingFileHandler for the same log file. On Windows the rename inside
doRollover() fails with WinError 32 while the other process holds the file
open, and the stock handler then raises on every subsequent emit: records
are dropped and stderr floods with --- Logging error --- tracebacks.

TolerantRotatingFileHandler reopens the current file after a failed
rotation, writes a single warning to stderr, and retries the rotation on
the next emit so it completes once the other process is gone.

Fixes #2563
2026-11-10 13:29:58 +03:30
Bingxi Zhao (Frank)
f8be756906 Integrate saved user workspace changes with reviewed dev updates 2026-10-07 20:37:55 +08:00
AoHanBei
900d10546c fix(usage): prefer exact model pricing matches 2026-09-16 22:08:33 +08:00
Bingxi Zhao (Frank)
df1615778a fix(logs): deliver a retrieval progress event logged off the event loop
A record logged from a worker thread reaches the handler with no running
loop in that thread. `ProcessLogHandler.emit` asked for one, caught the
`RuntimeError`, and returned — dropping the coroutine an async sink had
already created. The reader lost the event and the only trace was
`RuntimeWarning: coroutine 'RAGService._emit_tool_event' was never
awaited` (#1435). Retrieval does its heavy work off-loop, so this is
where its progress lines come from: the turn sat on a generic
"reasoning…" for a minute or two with nothing to say what stage it was
in, which is what the reporter actually felt.

`rag/service.py` already knew the answer — its own raw-log handler falls
back to `run_coroutine_threadsafe` on the loop it captured at setup. That
is the same decision stated twice, and the generic handler, which every
other caller goes through, had the wrong half of it. The rule moves into
`ProcessLogHandler` and the RAG copy becomes one of its users; the
duplicate handler class goes away.

An event with nowhere left to go is closed explicitly rather than
abandoned, so "the capture outlived its loop" no longer surfaces as a
never-awaited warning pointing at a coroutine the reader cannot place.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 20:38:42 +08:00
Bingxi Zhao (Frank)
93df3d48b7 release: v1.6.4
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.

Release notes: assets/releases/ver1-6-4.md
2026-09-03 01:38:54 +08:00
Lan-zk
3f1894e0c4 fix(knowledge): harden GraphRAG model and embedding compatibility (#747)
* fix(knowledge): add GraphRAG model compatibility layer

* fix(graphrag): harden compatibility preflight

* fix: align GraphRAG compatibility with current dev

* test: skip GraphRAG config test without optional extra

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-17 01:12:05 +08:00
LamXwah
179a8a1795 fix: preserve console exception tracebacks (#856) 2026-08-16 19:08:27 +08:00
Bingxi Zhao (Frank)
144c90f3f7 prepare v1.3.4 release
Made-with: Cursor
2026-05-01 13:51:45 +08:00
Bingxi Zhao (Frank)
824bf778df fix: lint & logging system 2026-05-01 01:39:08 +08:00
Bingxi Zhao (Frank)
77f29cbcc7 fix lint 2026-04-23 19:29:16 +08:00
Bingxi Zhao (Frank)
2745e8bde9 feat(book): introduce book capability and restructure guide/co_writer modules
- Add new `deeptutor/book/` module with multi-agent pipeline
  (ideation, spine, page planner, source explorer, synthesizer)
  and rich block system (text, code, figure, quiz, flash cards,
  callout, deep dive, timeline, animation, concept graph, etc.)
- Add `/api/routers/book.py` and `deeptutor_cli/book.py` entry points
- Add web UI under `web/app/(workspace)/book/` with sidebar,
  chat panel, page reader, spine editor, progress timeline, and
  block renderers
- Move `deeptutor/agents/co_writer` -> `deeptutor/co_writer` and
  `deeptutor/agents/guide` -> `deeptutor/guide` (then remove guide
  entirely now superseded by book)
- Remove legacy guide UI, hooks, types, and API router
- Update visualize agents/prompts, notebook service, prompt manager,
  session turn runtime, and shared services to support new flows
- Refresh chat composer, sidebar, notebook selector, and locales

Made-with: Cursor
2026-04-20 00:33:33 +08:00
Bingxi Zhao (Frank)
100576da69 release: v1.1.2 — schema-driven channels, secret masking, RAG simplification, KB-consistency hardening
* TutorBot Channels tab is now schema-driven across every built-in & plugin channel
  (GET /api/v1/tutorbot/channels/schema), with per-field secret reveal toggles.
* Channel secrets are masked end-to-end; raw values only surface via the explicit
  ?include_secrets=true edit-form route. PATCH validates ChannelsConfig at the API
  boundary and returns 422 on bad payloads. reload_channels is serialised by an
  asyncio.Lock and records last_reload_error for the UI.
* Collapsed services/rag/ to a single LlamaIndex pipeline: removed ~2.6k lines of
  unused components/* + pipeline.py + types.py + utils/ + parsers/. rag_provider
  is now a stub; legacy values silently coerce to llamaindex.
* Centralised file routing into services/rag/file_routing.py (FileTypeRouter /
  DocumentType / FileClassification); dropped per-provider extension helpers.
* Defensive RAG/KB consistency: deep_solve / deep_research strip rag/kb when no
  KB is attached; SolveToolRuntime + ResearchPipeline + DecomposeAgent
  short-circuit instead of falling back to non-existent default KBs (DE-all,
  ai_textbook).
* Externalised AgenticChatPipeline prompts into agentic_chat.yaml (zh + en).
* Added Thai README (#337).
* New test modules: file_routing, knowledge_base_config, channel_schema,
  channel_secrets, rag_consistency, research_pipeline_rag.

Full notes: assets/releases/ver1-1-2.md

Made-with: Cursor
2026-04-18 11:33:53 +08:00
Bingxi Zhao (Frank)
f3779138ae fix: remove lightrag and unify llm & search config 2026-03-13 23:48:49 +08:00
Bingxi Zhao (Frank)
9c18bf0705 codebase cleanup and decoupled, introduce cli operation 2026-03-13 20:42:16 +08:00