Commit Graph

78 Commits

Author SHA1 Message Date
unknown
37aafbb73d fix: send module_changed before cancelling active turn (P2-9)
Reorder change_module handler: send module_changed first, then cancel
the active turn, then save progress. This ensures the frontend processes
the module switch before receiving any cancellation error, preventing
the UI from getting stuck on a "Turn cancelled" dead end.
2026-05-20 10:25:52 +08:00
unknown
5bb807ab7e fix: cancel active turns before replace-modules via HTTP (P2-7)
The WS change_module path cancels active turns to prevent stale
progress overwrites, but the HTTP /replace-modules endpoint was
missing this protection. A concurrent turn's finally block could
restore old modules after replacement.
2026-05-20 10:16:13 +08:00
unknown
c40628346a fix: add continue after change_module to prevent spurious error (P2-3)
The change_module handler fell through to the generic unknown-type
error, so every module switch sent both module_changed and an error.
2026-05-20 10:08:17 +08:00
unknown
261865c2a5 fix: split init_modules into replace/merge (P2-2)
- Add replace_modules() that cleans stale KP state (mastery, repetition, errors, feynman)
- Rename init_modules to merge_modules, keep alias for backward compat
- Add /replace-modules API endpoint for full module replacement
2026-05-20 00:21:15 +08:00
unknown
b611c2b11c fix: restore active turn on page refresh (P1-8)
- Add check_active_turn WS message handler returning turn_id + status
- Frontend sends check_active_turn on connect instead of start_turn
- If active turn exists, subscribe_session to resume; otherwise start_turn
2026-05-20 00:20:26 +08:00
unknown
783776ad26 fix: connect() closure deps (P1-6) + change_module race guard (P1-7)
- Add modules.length, moduleSelected, currentModuleId to connect() useCallback deps
- Add version field to LearningProgress and CAS save to LearningStore
- Cancel active turn before change_module (await task completion)
- Clear pending auto-advance timer on module_changed event
2026-05-20 00:18:50 +08:00
whf
a27b2749f0 fix: preserve question metadata in save_question_answers merge; clear feynman_retries on redo 2026-05-19 22:25:34 +08:00
unknown
1f7c3feae0 fix: use JSON-structured records in notebook prompt, prevent injection (Block2) 2026-05-19 22:07:07 +08:00
unknown
e70a24d574 fix: server-side KP/module mapping, remove client-trusted fields (Block5) 2026-05-19 21:58:09 +08:00
unknown
2a49676a68 fix: unify grade_answer, remove substring false positive (Block4) 2026-05-19 21:52:16 +08:00
whf
d086a06b90 Fix 3 P2 bugs from Codex global review: manual module id collision, stale chapters on book switch, stage not reset on module switch 2026-05-17 12:56:24 +08:00
whf
97496d6511 Block 9: backend endpoint tests (21 new + 3 list_all), fix stale local HTTPException imports 2026-05-17 02:42:09 +08:00
whf
7b273d8db8 Block 8 refinement: remove KB placeholder tab, use bookApi.list, LLM parsing type safety, toast on import failure 2026-05-17 02:22:36 +08:00
unknown
64989bd3e7 Block 7+8: Book integration + Create Module dialog (4 tabs)
Block 7: "Start learning" button on BookLibrary cards, import-from-book
endpoint, handleLearn with duplicate progress check, i18n keys.

Block 8: CreateModuleDialog with manual/book/KB/notebook tabs,
generate-from-notebook backend endpoint with LLM extraction,
listBooks/generateModulesFromNotebook API functions, 30+ i18n keys.
2026-05-17 00:05:16 +08:00
whf
cdc1b73ed8 Block 7: /book integration — Start Learning button in BookLibrary 2026-05-16 23:52:15 +08:00
whf
fb7787b089 Block 5+6: DELETE/redo endpoints, change_module WS, LLM progress hints 2026-05-16 23:33:56 +08:00
whf
3fd2d8e809 Block 2: backend list_all + list_progress + GET /progress endpoint 2026-05-16 21:53:22 +08:00
whf
6f3070f8d3 Block 21: Auto-mastery calculation, mock module cleanup, quiz_attempts tracking, global review passed 2026-05-15 00:58:34 +08:00
whf
315b5d0da0 Block 18: StreamBus wait_for_input bidirectional mechanism with bus registry 2026-05-14 22:28:10 +08:00
whf
526bc1c550 Block 17: Server-side question answer persistence, eliminate client-supplied expected_answer 2026-05-14 21:05:52 +08:00
whf
22336e648e Block 16: Server-side answer grading, remove client-supplied is_correct/mastery_estimate 2026-05-14 20:29:34 +08:00
unknown
ed9654a8b5 fix: address 7 confirmed security/code-quality audit findings (C2,C3,H1-H5) 2026-05-13 00:40:49 +08:00
whf
7193006cbd fix: 5 minor code quality improvements in guided_learning router
- Fix 1: Chinese comment → English
- Fix 2: Move late imports (PydanticValidationError, KnowledgePoint, LearningModule, HTTPException) to top-level
- Fix 3: Remove duplicate HTTPException imports in except blocks
- Fix 4: Document init_modules reset behavior for incremental module addition
- Fix 5: Add book_id validation to all 4 endpoints (+ colon per Codex review)

Codex-reviewed, 52/52 tests pass.
2026-05-12 23:35:53 +08:00
unknown
3dd5771066 Sync upstream: merge HKUDS/DeepTutor main (up to v1.3.10)
# Conflicts:
#	deeptutor/api/main.py
#	web/app/(workspace)/chat/[[...sessionId]]/page.tsx
#	web/components/chat/home/ChatMessages.tsx
2026-05-12 18:39:54 +08:00
unknown
ccfc64a381 fix(M9): add validation error handling with clear messages in init-modules 2026-05-12 17:47:38 +08:00
unknown
95ce77c721 fix(M4): auto-create initial repetition state when missing in submit_answer 2026-05-12 17:39:59 +08:00
unknown
d16e749c34 fix(H9): remove knowledge_points from dict before unpacking to avoid duplicate argument 2026-05-12 17:27:18 +08:00
unknown
325af91a02 fix(C5): use .get() instead of .pop() to avoid mutating request body 2026-05-12 14:51:05 +08:00
unknown
08e1829fde fix(C4): remove router singleton race condition + use unique tmp filenames in atomic write 2026-05-12 14:45:59 +08:00
Bingxi Zhao (Frank)
ac8f00bd65 prepare v1.3.10 release 2026-05-10 22:56:21 +08:00
Bingxi Zhao (Frank)
df925e6f97 fix lint 2026-05-09 03:11:27 +08:00
Bingxi Zhao (Frank)
72bcdd77d8 prepare v1.3.9 release 2026-05-09 02:53:14 +08:00
Bingxi Zhao (Frank)
2c4769a96f prepare v1.3.8 release
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-08 02:36:24 +08:00
whf
8e5c601012 Fix #3: add init-modules endpoint + router registration in main.py (with Codex edge case fix) 2026-05-07 22:05:21 +08:00
whf
44a77b4afd Fix #3+#5: add init-modules endpoint + DEBUG_MODE (LEARNING_DEBUG=1 for second-level intervals) 2026-05-07 21:54:04 +08:00
unknown
4f30e0fa1a fix(guided-learning): convert error_type string to ErrorType enum in submit_answer 2026-05-06 22:48:46 +08:00
whf
23bf4537e7 Block 12: Add guided learning API router (GET progress, POST answer, GET reviews) 2026-05-06 09:49:32 +08:00
Bingxi Zhao (Frank)
5c31f0dee6 Merge remote-tracking branch 'origin/main' into multi-user
# Conflicts:
#	deeptutor/knowledge/manager.py
#	deeptutor/services/memory/service.py
#	pyproject.toml
#	requirements/server.txt
#	web/app/(workspace)/agents/page.tsx
2026-05-04 17:12:06 +08:00
Bingxi Zhao (Frank)
93891789fa prepare v1.3.7 release
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-04 16:21:41 +08:00
Bingxi Zhao (Frank)
eff1c0dff6 prepare v1.3.6 release
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 16:35:52 +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)
255738d991 prepare v1.3.3 release
Document v1.3.3 and include the latest Space context, memory, RAG, provider, and session stability updates for release.

Made-with: Cursor
2026-04-30 23:41:58 +08:00
Bingxi Zhao (Frank)
a069b6ebf0 chore: prepare v1.3.2 release
Embedding endpoint URLs are now transparent end-to-end: Settings shows the
exact URL DeepTutor will POST to, legacy `/v1`-style bases are migrated to
full `/embeddings` / `/api/embed` URLs, the embedding client rejects
known-provider misconfigurations early, and OpenRouter routes through the
same exact-URL HTTP adapter as other providers.

LlamaIndex RAG now refreshes embedding state before initialize/search/add,
validates persisted vectors before retrieval, and reports invalid indexes
with `needs_reindex: true` instead of raw NumPy/`NoneType` errors.

Memory refresh strips `<think>` / `<thinking>` blocks from reasoning-model
output before writing PROFILE.md / SUMMARY.md, and existing memory files
self-repair on read.

Also fixes a Deep Solve runtime regression where `MainSolver` still passed
a stale `attachments` keyword to `SolverAgent.process()`.

Adds release notes (assets/releases/ver1-3-2.md) and updates README.

Made-with: Cursor
2026-04-29 20:44:05 +08:00
Bingxi Zhao (Frank)
28e225ee0e chore: prepare v1.3.1 release
Stability release after v1.3.0 covering safer RAG/KB routing, stronger
embedding validation, more reliable Docker/TutorBot restarts, Web UX
fixes, and Windows/encoding hardening. See assets/releases/ver1-3-1.md
for the full notes.

Made-with: Cursor
2026-04-28 12:00:11 +08:00
Bingxi Zhao (Frank)
7fce54d98a chore: prepare v1.3.0 release
Made-with: Cursor
2026-04-27 21:09:25 +08:00
Bingxi Zhao (Frank)
e53985d7f0 Merge origin/main into multi-user 2026-04-26 11:45:57 +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