38 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
6bbcc00c55 Merge dev into preview, preserving preview features
Integrate dev fixes with preview's Python/TypeScript schedulers, chat queue, learning navigation, and live turn persistence.
2026-10-27 01:16:58 +08:00
Bingxi Zhao (Frank)
28c11e2ae8 feat: update notes, chat interactions and workspace UI on preview
Remove course pages, APIs and the course_study capability. Add anchored note
threads and reviewed learning-block generation, queued and withdrawable chat
messages, quote attachments, side chats, and the calendar/favorites/navigation
updates.

Keep preview's existing backend architecture. Wire the new features through
its Python application and existing chat engine, retain legacy selected-text
requests, persist mid-turn messages in replay, and restore note context when
regenerating. Leave stored user data intact.

Validate frontend contracts, dependency boundaries, types, 1290 node tests,
840 rendered tests, lint, localization and the production build. Exercise
session/notes/API regressions, 53 chat-engine tests and 20 Python/native
integration tests with isolated runtime data.
2026-10-26 22:13:34 +08:00
Bingxi Zhao (Frank)
857a82e74a feat(notes): add block notebooks with inline reviews and linked favorites
Add rich text and learning blocks, media uploads, page trees, and revisioned notebook storage. Present AI suggestions at their target blocks with durable accept and dismiss actions.

Unify saved outputs as Favorites with typed expandable blocks, stable source links, atomic batch insertion, nesting, dragging, and undo/redo.

Validation: 99 frontend tests and 99 backend tests pass in an isolated snapshot, along with TypeScript, scoped ESLint, dependency architecture, and locale parity checks.
2026-10-17 23:15:23 +08:00
Bingxi Zhao (Frank)
6ab4f9a766 feat(web): add classic/modern layout switch with Notion-style modern chrome
- Settings → General gains a classic/modern layout choice; classic is a frozen
  snapshot of dev's sidebar and learning dashboard, modern keeps iterating.
  Variants differ only through slots, tokens and per-variant CSS on
  <html data-ui-layout>; the preference lives in localStorage.
- Modern chrome: warm neutral tokens, WorkspaceMenu header, ⌘K command palette
  and keyboard shortcuts, PageBar location strip, swipeable PartnerRoster.
- Remove dead HomeShortcuts, WorkspaceSwitcher and the inline sidebar search
  query chain.
2026-10-15 23:00:23 +08:00
Bingxi Zhao (Frank)
fd8f108178 fix: restore lighter page styling with subtle navigation refinements 2026-10-13 03:21:51 +08:00
Bingxi Zhao (Frank)
1c735c75ea feat: unify page chrome and refine DeepTutor navigation 2026-10-13 00:14:50 +08:00
dajiaohuang
ec2556c89c fix(notebook): restore save state after dialog cancellation 2026-10-08 12:39:33 +08:00
Bingxi Zhao (Frank)
de5ecb9b2a fix(tooltips): migrate data and admin button hints (#1526) 2026-09-27 10:25:50 +08:00
Bingxi Zhao (Frank)
2dcc5871df Reconcile linked-folder UI and book route integration 2026-09-23 10:48:46 +08:00
Bingxi Zhao
d44bd8e934 Merge pull request #1339 from evan188199-tech/codex/feat/notebook-edit-discoverability
feat(notebook): expose direct record editing
2026-09-23 10:23:01 +08:00
Bingxi Zhao (Frank)
ee24f44fa7 fix(ui): unify accessible tooltips (#1526) 2026-09-21 14:51:29 +08:00
Bingxi Zhao (Frank)
da856ad670 release: v1.6.9
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.

Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
2026-09-21 02:30:40 +08:00
XZH
1e845ee1c0 feat(notebook): move notebook editing to sidebar 2026-09-09 12:53:38 -07:00
XZH
b0d3bd9e69 feat(notebook): expose direct record editing 2026-09-09 08:21:52 -07:00
Bingxi Zhao (Frank)
6e6e56aedb release: v1.6.3
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.

Release notes: assets/releases/ver1-6-3.md
2026-09-02 04:09:11 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
XZH
4032e37f26 feat(video-learning): add timestamped transcript notes (#1137) 2026-08-30 23:39:55 -07:00
Bingxi Zhao (Frank)
ce7c2dc2dc release: v1.6.1 — one key, one navigator, one sidebar you arrange
Model configuration was one layer replicated seven times: every service
stored its own profile with its own credentials, so a single OpenRouter
key had to be pasted into five separate pages. This release splits that
in two — a **connection** holds one vendor credential and links it down
to every service that vendor can serve, and a **task model** takes the
calls nobody asks for (naming a conversation, writing the composer's
starting points) off the model picked for actual reasoning. Both are
opt-in; existing per-service profiles resolve exactly as before.

Around that: Settings drops the card grid for a persistent searchable
navigator whose landing page answers "what state am I in" instead of
repeating the directory; Mastery Path files study conversations under
their topic and opens them in the tutor rather than dropping them on
/home; the sidebar folds features into More and reorders by drag; the
reading companion is rebuilt from /home's own chat components; and the
LightRAG engine talks to the SDK directly, so its extra no longer drags
MinerU in transitively.

Also back-merges PR #1041 (Anthropic SDK 1.x temperature via extra_body)
and PR #741 (owner-only auth secret/token files), which had been merged
straight into main and never flowed back to dev.

Release notes: assets/releases/ver1-6-1.md
Gates: pre-commit 15/15, ruff clean, pytest 5802 passed, web 450 node
tests, eslint 0 errors, docs build clean.
2026-08-30 13:19:42 +08:00
Bingxi Zhao (Frank)
43c9fe7ea0 feat(course): make a course the container, not a dashboard
A course held the right model — the syllabus that gives progress a
denominator, resources as references, conventions apart from the
assistant's own notes — but almost nothing crossed the edges between it
and the surfaces it was supposed to contain.

Getting in. Course Study was offered in the composer's mode menu while
the only way to bind a course was a link on the course page, so choosing
it there produced a conversation identical to an inert one, and the mode
advised pressing a button that did not exist. The composer now carries
the binding next to the mode: shown whenever there is one, and offered
as an unfinished field in Course Study when there is not. `_course_id`
rides every turn, so detaching detaches and the pill can never drift
from what the turn actually saw.

What a conversation inherits. `default_capability` and `default_persona`
were stored, validated and returned by the API while changing nothing:
`_apply_course_defaults` only fills fields a payload *omits*, and this
composer always sent all of them. They are applied client-side now,
along with the course's knowledge bases, where the learner can watch the
mode and material become the course's before they type. The dialog grows
the editor they never had.

Conventions. "Every conversation in this course starts knowing these" was
true only if the model happened to call `course_overview`. They ride in
the per-turn summary now, and — because the promise is not scoped to one
mode — in the system prompt of any course-bound turn.

Coming back. Mastery Path and Immersive Reading now read `?course=`,
scope themselves to it, and attach whatever is built there; the tiles and
hand-offs pass it; the picker offers to start one. A course could only
ever reference what already existed, so filling a new one meant leaving,
building, and remembering to return.

Hand-offs. A target with no ref stored an opening line for an index that
never consumes it, which then surfaced weeks later in an unrelated path.
An unresolvable ref was passed straight through: observed live, a
syllabus unit id ("u2") sent as a mastery path, producing a card pointing
at a page that does not exist. Refs are checked against the subsystem
that owns them — existence, not membership, since a path built outside
this course routes perfectly well.

Also: the sidebar groups conversations by course, so filing them is
finally readable; a course-scoped notebook console no longer shows
another course's notes beside a list saying there are none (the clear
raced an in-flight detail fetch that landed after it); a hand-off the
model also printed as prose is not rendered twice; a provider error is no
longer stored as a conversation's permanent title; `/space/courses` goes,
having been an unreferenced copy of `/courses`; and the Visualize mode
description gets its missing Chinese.
2026-08-30 00:09:36 +08:00
Bingxi Zhao (Frank)
fc0be68d6f wip: course / partner groups in progress 2026-08-29 22:29:53 +08:00
Bingxi Zhao (Frank)
31bf66b5e1 release: v1.5.15
Self-hostable PageIndex, a fileable question bank, and third-party plugins.

- PageIndex: adds PageIndex OSS as its own knowledge-base type, bound to
  the base's local library and driven by the configured LLM rather than a
  PageIndex API key. Retrieval moves off the built-in MCP server (removed)
  onto a workflow-owned reading loop that walks the document tree.
- Question bank: addEntryToCategory shipped in v1.3.6 and was never called
  from the frontend, so categories could be created but never filled. The
  quiz card now uses the shared CategoryMenu, the page is rebuilt around
  search / batch selection / an unfiled inbox, and a new question_bank tool
  lets the tutor file questions instead of misrouting them to write_note.
- Plugins: deeptutor.plugins was imported behind a try/except but the
  module never existed — implemented, plus a deeptutor.loop_capabilities
  group so third-party packages can register chat-loop capabilities.
  Builtins win on name collisions; broken entry points are skipped.
- Parsing: remote Apache Tika engine (TIKA_SERVER_URL), with no local
  package and no model download.
- LightRAG: the three indexing knobs from #877 get inputs under their own
  Indexing divider; unsupported keywords are dropped with a warning.
- Knowledge bases: uploads take a destination folder, same-named documents
  from different subtrees stop dropping one another, and linked folders
  keep their source-relative structure — closing #866.
- Book: a learning-capture inbox with an explicit status lifecycle, and
  drift warnings scoped to the KB documents that actually changed.
- Whisper: /whisper moves out of the primary nav into Learning Space →
  More Projects, credited to its contributor; the room needs its own
  capability package. The reusable half is CAPABILITY_COMPLETE forwarding
  of a capability-declared body and its declared extras.
- README: a Collaborate badge beside the Docs badge, in all twelve
  languages.
- Lint: nosec B608 on four false-positive question-bank queries (literal
  fragments only, every value bound), and three mypy fixes.

Release notes: assets/releases/ver1-5-15.md
2026-08-20 14:15:53 +08:00
Bingxi Zhao (Frank)
7c6bcfaef7 release: v1.5.14
Immersive Reading, self-configuration, and a two-way IMA library.

- Immersive Reading: a new capability that opens a document beside the
  thread. New reading engine (PDF pages / slides / page-sized sections),
  five reading tools, a deterministic locate pre-pass that grounds the
  turn without a second LLM call, /api/v1/reading, and a reader pane with
  selection, highlights, notes, and export to an annotated PDF or Markdown.
- Setup capability: inspect the install, apply a setting, install a
  parsing engine, or request a credential from a chat turn. New settings
  spec table; a candidate value is probed before it is committed, and API
  keys never enter the model's context.
- Tencent IMA: pipeline split into transport/envelope/models/sources/
  notes/media/inventory, an additive capability with five tools, and
  connected libraries that can finally be enumerated (bounded listings
  are reported as a lower bound).
- Retrieval: supports_rag_retrieval() replaces is_connected_kb() for the
  "can I sweep this?" question, so linked / lightrag_server / ima sources
  stop being silently dropped from every book.
- Notebooks: their own console at /notebook, per-notebook locks and atomic
  writes, copy / move / export routes, damaged files surfaced instead of
  dropped, and renaming a record no longer clears its knowledge-base link.
- Settings persistence: one lock and one atomic replace shared by every
  writer of interface.json; the PUT endpoints stop writing the
  defaults-merged view back to disk.

Release notes: assets/releases/ver1-5-14.md
2026-08-19 17:34:52 +08:00
Bingxi Zhao (Frank)
c9d387e2b6 super super great great update 2026-06-17 00:56:27 +08:00
Bingxi Zhao (Frank)
90a2c14c81 chore: backend + frontend follow-ons for v1.4.0-beta
Wires the new memory / capability / settings / quiz subsystems into
existing surfaces and finishes the chat-pipeline follow-on work.

Backend:
- Session services pick up the cumulative source inventory + new tool
  tags (turn_runtime, sqlite_store, pocketbase_store, protocol,
  base_session_manager).
- LlamaIndex RAG pipeline config / document_loader / retrievers
  tightened; rag/service.py routed to match.
- Sessions / unified_ws / settings / notebook routers updated for
  delete-chat-turn, multi-user, and the new tool surface.
- TutorBot manager + Zulip channel + openai_compat_provider follow-on
  fixes layered on top of the v1.3.10 SSL/Zulip sweeps.
- runtime/{banner, launcher, orchestrator}, services/setup/init,
  prompt/manager, json_parser refined for the runtime-settings
  rewrite.

Frontend:
- Co-Learn pages and session-surfaces removed (folded into chat).
- Chat composer / messages / trace / session panels, sidebars,
  common modals, markdown renderers, and i18n updated for the new
  ask_user / write_note / source-inventory flow.
- Admin, agents, co-writer, playground, book pages picked up the
  shared updates.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:08:22 +08:00
Bingxi Zhao (Frank)
1596807242 refactor chat capability & RAG pipeline(llamaindex) 2026-05-13 21:36:07 +08:00
WeDone
20c42491a2 fix: replace all fetch() with apiFetch() for authenticated API calls
- Replace fetch() with apiFetch() in 18 files across web/
- Remove redundant credentials: 'include' since apiFetch handles it
- Affected modules: auth, admin, session, skills, book, knowledge,
  notebook, co-writer, playground, agents, sidebar components,
  SaveToNotebookModal, VersionBadge, useTextSource
- Fixes 401 Unauthorized errors in multi-user mode
2026-05-12 15:32:23 +08:00
Bingxi Zhao (Frank)
6428458049 chore: prepare v1.2.5 release 2026-04-25 22:08:44 +08:00
Bingxi Zhao (Frank)
4b7d24d33e release: v1.2.3 — document attachments, thinking blocks, provider core refactor
- Chat document attachments (PDF/DOCX/XLSX/PPTX) with text extraction
- Reasoning model <think> block display as collapsible cards
- Tri-state send_dimensions toggle for embeddings (#368)
- LLM provider_core module refactor + context_window detection
- Soul template editor (PR #373), Co-Writer save-to-notebook
- Knowledge Base drag-and-drop upload, delete resilience (#370),
  progress persistence, supported-file-types endpoint
- Question generation language fidelity via shared prompt directives
- Settings tour redesign, CLI notebook add-md/replace-md
- Bug fixes: CJK bot name slug, I18nProvider init, Skills default off,
  Moonshot base URL, version badge
- Provider registry: custom_anthropic, thinking_style, alias expansion
- +1900 test lines across 15 new/expanded test files

Made-with: Cursor
2026-04-24 22:36:32 +08:00
Bingxi Zhao (Frank)
77f29cbcc7 fix lint 2026-04-23 19:29:16 +08:00
Bingxi Zhao (Frank)
593ddba3fb feat(co-writer): add multi-doc co-writer workspace with backend storage
- Add co-writer storage module and API router for document persistence
- Restructure co-writer page to per-doc routing ([docId]) with sidebar recent list
- Wire CoWriterRecent into sidebar shell and AppShellContext
- Tidy notebook prompts, facade, path service, and builtin tools wiring
- Refresh tests (add missing __init__.py, drop obsolete app_facade test)
- Add favicon/apple-touch-icon assets and minor i18n cleanup

Made-with: Cursor
2026-04-20 19:46:41 +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)
e8aa57d737 release: v1.1.1 — universal answer-now, co-writer scroll sync, notebook system unification, tutorbot config refactor
- Promote "Answer now" to a universal escape hatch via answer_now_context;
  orchestrator re-routes any capability to chat._stage_answer_now.
- Co-Writer: draggable split + persistent ratio + line-anchored
  bidirectional scroll sync using a hidden mirror for wrap-aware editor y.
- SaveToNotebookModal: optional message-selection mode with quick presets;
  rebuild transcript / userQuery from the selected subset.
- Adopt the real notebook API (/api/v1/notebook/*) across Knowledge tab,
  guide notebook picker, and save-to-notebook flow; new typed helpers in
  web/lib/notebook-api.ts (listNotebooks/getNotebook/createNotebook/...).
- Extract CollapsibleConfigSection; unify Quiz / Math Animator / Visualize
  / Deep Research panels behind one collapsed-summary header.
- Replace streaming spinner with a dedicated Stop button; persistent
  composer header; mask-gradient on messages container.
- TutorBotManager: public load/save/merge API; atomic write via temp +
  Path.replace; merge_bot_config with explicit-clear semantics; new
  tests/services/tutorbot/test_manager_config.py.
- MarkdownRenderer: trackSourceLines passes data-source-line through;
  RichCodeBlock skips Prism for unlabeled/plaintext fences; mermaid
  detection includes flow/seq/sequence editor.md fences.
- UI/theme: deeper foregrounds + warmer borders for light/Snow themes;
  /guide migrated off hardcoded slate/indigo to design tokens;
  HistorySessionPicker themed and timestamp-seconds bug fixed.
- Filter system messages out of UnifiedChatContext.hydrateMessages and
  ChatMessageList so backend grounding context never renders as a bubble.
- Bug fixes (already merged earlier in dev):
  * tutorbot config wipe on restart (#332)
  * selective_access_log middleware unpack crash (#334/#335)
  * 15 npm security vulnerabilities — jspdf/next/mermaid (#330)
- Drive-by: remove "// README" typo from .env.example_CN.
- Add v1.1.1 release notes and update README.

Made-with: Cursor
2026-04-17 22:43:52 +08:00
Bingxi Zhao (Frank)
727d49cf8b release: v1.1.0 — LaTeX parsing overhaul, LLM probe config, extra_headers fix, notebook UUID fix
- Rewrite LaTeX block math normalization with heuristic-based $→$$ promotion
- Move LLM diagnostic probe max_tokens from env var to agents.yaml
- Fix extra_headers merge in LLM factory complete/stream (prevents TypeError)
- Fix SaveToNotebookModal to use notebook UUIDs instead of category IDs (#301)
- Add Docker + local LLM (host.docker.internal) guidance in env/compose files
- Add tests: LaTeX, notebook router, summarize agent, LLM probe, extra_headers
- Add v1.1.0 release notes and update README

Made-with: Cursor
2026-04-15 02:15:19 +08:00
Bingxi Zhao (Frank)
8659d996f5 v1.0.3
Question Notebook with bookmarks & categories, Mermaid diagram support
in Visualize, embedding mismatch detection refinement, system message
merging for Qwen/vLLM, LM Studio & llama.cpp providers, Glass theme,
reporting agent retry resilience, and docs migration.

Made-with: Cursor
2026-04-13 03:18:26 +08:00
Bingxi Zhao (Frank)
5384224932 fix: leakage repair 2026-04-11 12:23:32 +08:00
Bingxi Zhao (Frank)
5960fbc0f7 refactor: remove litellm dependency, align provider architecture
- Replace litellm with native openai + anthropic SDKs across both
  services and tutorbot layers
- Add 5 new providers: mistral, stepfun, xiaomi_mimo, qianfan, ovms
- Add `backend` field to ProviderSpec for SDK routing
- New TutorBot OpenAICompatProvider (openai SDK) and AnthropicProvider
  (anthropic SDK), replacing LiteLLMProvider
- Rewrite services/llm/executors.py to use openai SDK directly
- Remove litellm from factory.py routing, token_tracker, provider_cmd
- Auto-fallback to streaming for tool-call format errors (fixes #265)
- Settings UI: provider dropdown with auto base-url fill
- Clean up litellm from requirements/cli.txt and pyproject.toml

Made-with: Cursor
2026-04-08 19:59:44 +08:00
Bingxi Zhao (Frank)
9c18bf0705 codebase cleanup and decoupled, introduce cli operation 2026-03-13 20:42:16 +08:00
Bingxi Zhao (Frank)
91197f3729 chore: deeptutor 2.0 2026-03-13 01:47:38 +08:00