Commit Graph

110 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
df844b8216 feat: add visualize capability with Chart.js/SVG rendering pipeline
- Add visualize agent pipeline (analysis → code generation → review)
- Add VisualizeCapability with request config and registry wiring
- Add frontend VisualizeConfigPanel, VisualizationViewer components
- Add chart.js and react-chartjs-2 dependencies
- Improve math_animator YON_IMAGE anchor block prompts (en/zh)
- Add minimax model override (supports_response_format: false)
- Suppress noisy uvicorn WebSocket connection logs
- Add selective HTTP access logging middleware (non-200 only)

Made-with: Cursor
2026-04-10 20:09:36 +08:00
Bingxi Zhao (Frank)
d988be7757 Merge commit 'refs/pull/266/head' of github.com:HKUDS/DeepTutor into dev
Made-with: Cursor

# Conflicts:
#	deeptutor/agents/math_animator/renderer.py
2026-04-08 20:08:19 +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
kevin
f6a081812e fix(guide): prevent polling from overwriting user's tab navigation
Backend poll (fetchPageStatuses) returns current_index=0 from
start_learning, which mergePageState unconditionally applied — causing
the UI to snap back to page 1 whenever the user clicked another tab.

Only accept server's current_index when user hasn't navigated yet
(current_index < 0), preserving tab selection during polling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 16:12:03 +08:00
kevin
055c467a40 fix(guide): fix KaTeX math rendering in Guided Learning pages
- Configure $...$ and $$...$$ delimiters in auto-render (KaTeX default
  only recognizes $$..$$ and \(\..\))
- Remove broken SRI integrity hashes from CDN links (hash mismatch blocks
  resource loading)
- Add parent-window fallback rendering: detects bare LaTeX text nodes
  (e.g. \underbrace, \mathbb without $ wrapping), auto-wraps them,
  then calls renderMathInElement — handles cases where inline init script
  gets corrupted by page content containing </script> strings
- Increase guide agent max_tokens 8192->16384 to prevent HTML truncation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 16:12:03 +08:00
kevin
5c048a9609 Fix Windows compatibility for Math Animator renderer
This PR fixes multiple Windows compatibility issues that prevented
the Math Animator from generating videos on Windows systems.

### Changes

1. **renderer.py**: Fix subprocess execution on Windows
   - Replace `asyncio.create_subprocess_exec` with `subprocess.run` + `asyncio.to_thread`
   - The original approach silently fails on Windows when uvicorn uses SelectorEventLoop (default)
   - New approach works regardless of event loop type

2. **code_generator_agent.yaml (en/zh)**: Add Manim v0.20.1 compatibility constraints
   - Prohibit `MarkupText` (requires LaTeX)
   - Prohibit `stroke_dash_pattern` parameter (not supported in v0.20.1)
   - Prohibit `save_state()` method (not supported in MovingCameraScene)
   - Applied to both `generate_system` and `retry_system` sections

3. **ChatComposer.tsx**: Suppress hydration warning for i18n placeholder
   - Add `suppressHydrationWarning` to textarea
   - Resolves SSR/CSR text mismatch warning for language-specific placeholders

### Testing

- ✅ CLI mode: Successfully generated Pythagorean theorem animation (660KB)
- ✅ Web mode: Successfully generated cone cross-section animation
- ✅ Auto-retry: First attempt error → LLM repair → second attempt success

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 16:12:03 +08:00
kevin
7b55f11c7e Fix Windows compatibility for Math Animator renderer
This PR fixes multiple Windows compatibility issues that prevented
the Math Animator from generating videos on Windows systems.

### Changes

1. **renderer.py**: Fix subprocess execution on Windows
   - Replace `asyncio.create_subprocess_exec` with `subprocess.run` + `asyncio.to_thread`
   - The original approach silently fails on Windows when uvicorn uses SelectorEventLoop (default)
   - New approach works regardless of event loop type

2. **code_generator_agent.yaml (en/zh)**: Add Manim v0.20.1 compatibility constraints
   - Prohibit `MarkupText` (requires LaTeX)
   - Prohibit `stroke_dash_pattern` parameter (not supported in v0.20.1)
   - Prohibit `save_state()` method (not supported in MovingCameraScene)
   - Applied to both `generate_system` and `retry_system` sections

3. **ChatComposer.tsx**: Suppress hydration warning for i18n placeholder
   - Add `suppressHydrationWarning` to textarea
   - Resolves SSR/CSR text mismatch warning for language-specific placeholders

### Testing

- ✅ CLI mode: Successfully generated Pythagorean theorem animation (660KB)
- ✅ Web mode: Successfully generated cone cross-section animation
- ✅ Auto-retry: First attempt error → LLM repair → second attempt success

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 22:36:03 +08:00
zzhtx258
58d72b9c22 update 2026-03-29 13:16:14 +08:00
zzhtx258
26a82e77d3 update 2026-03-29 12:45:37 +08:00
Bingxi Zhao (Frank)
9bd7d5fba7 update readme 2026-03-24 21:07:49 +08:00
zzhtx258
f04851e536 fix bugs, and enforce math video length 2026-03-22 19:49:14 +08:00
Bingxi Zhao (Frank)
c15e22a4b3 chore: stable fix, add tutorbot 2026-03-20 20:27:17 +08:00
Bingxi Zhao (Frank)
a5d601d39f fix: RAM buffer problems 2026-03-14 01:46:13 +08:00
Bingxi Zhao (Frank)
9e8cea8294 fix: update embeddings config & provide perplexity search 2026-03-14 00:37:52 +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
Bingxi Zhao (Frank)
91197f3729 chore: deeptutor 2.0 2026-03-13 01:47:38 +08:00
Bingxi Zhao (Frank)
6ff107d960 Merge branch 'dev' into feat/vision_slover 2026-03-09 14:47:53 +08:00
Bingxi Zhao
e1bedcb336 refact solver+questiongen, add base module for personalization 2026-02-12 12:29:16 +08:00
logo
55472f05c1 实现用于图像分析和 GeoGebra 可视化的视觉求解器模块 2026-02-04 00:58:04 +08:00
logo
bb01d13d85 实现用于图像分析和 GeoGebra 可视化的视觉求解器模块
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-04 00:36:22 +08:00
logo
23ece51e4d 增加启动逻辑 2026-02-03 20:14:12 +08:00
Pancake
2384bd8e75 updage mem 2026-02-03 01:33:24 +08:00
logo
db1cfda90f Merge branch 'main' into feat/debug_run 2026-01-28 23:56:06 +08:00
logo
2cb225aab2 Merge branch 'main' into feat/debug_run 2026-01-27 11:09:44 +08:00
Frant1cc
7c0315daab feat:Add a scrollbar for confirmation 2026-01-25 22:28:46 +08:00
Frant1cc
83f7a53f50 fix:i18n improvenment 2026-01-25 22:27:31 +08:00
Frant1cc
5ecd8b76a6 fix:CoWriterEditor scroll sync 2026-01-25 19:00:30 +08:00
Pancake
0d860a2d12 fix: lint 2026-01-23 01:42:25 +08:00
Pancake
543b507395 feat: add document incrementally 2026-01-22 23:54:45 +08:00
Pancake
100ae27105 feat: add Chinese, frontend persistence, flexible import of rag library 2026-01-21 21:05:48 +08:00
Pancake
cd09c424fe fix: frontend session persistence 2026-01-19 15:48:02 +08:00
Pancake
51902b1491 fix: temperature issues & dockek npm build problem 2026-01-19 14:38:46 +08:00
Bingxi Zhao
3f40ce4301 fix: web lint 2026-01-18 17:40:10 +08:00
Bingxi Zhao
b607568633 fix 2026-01-18 17:24:49 +08:00
Bingxi Zhao
0a96e701ec fix docker & KB init 2026-01-18 17:20:35 +08:00
Bingxi Zhao
1e9cc6b26d fix: KB init & migrate, code structure 2026-01-18 15:30:28 +08:00
Bingxi Zhao
93b5018501 fix: DB init & migrate 2026-01-18 14:49:07 +08:00
Bingxi Zhao
c1752f0512 fix: rag-provider 2026-01-18 13:52:29 +08:00
Bingxi Zhao
b3f511d45f feat: enhance RAG pipeline with Docling support and improve CI/CD workflows 2026-01-18 12:25:45 +08:00
Bingxi Zhao
5a546b53f6 feat: enhance RAG pipeline with Docling support and improve CI/CD workflows 2026-01-18 12:25:45 +08:00
Bingxi Zhao
12a5172a8b fix:docker 2026-01-18 02:59:55 +08:00
Bingxi Zhao
1578a77af6 merge: resolve conflicts from origin/dev 2026-01-15 22:29:30 +08:00
Bingxi Zhao
fdd0aea3a9 refactor: code cleanup and improvements
- Backend: knowledge router, add_documents, initializer, manager updates
- Config: knowledge_base_config, RAG routing improvements
- Frontend: guide components, hooks, knowledge page updates
- Context providers and type definitions cleanup
2026-01-15 22:28:22 +08:00
Pancake
f5b7a2e2df fix: env, file upload, web refactor, llm details 2026-01-15 21:05:16 +08:00
Bingxi Zhao
388bc1359a refactor frontend & rag 2026-01-15 18:41:30 +08:00
Bingxi Zhao
a9be64a0d8 Merge origin/main into dev 2026-01-15 14:09:51 +08:00
Bingxi Zhao (Frank)
74c8d14af0 Merge pull request #127 from ahmedjawedaj/feature/folder-sync-refactored
feat: folder sync with improved architecture (supersedes #122)
2026-01-15 13:31:21 +08:00
Bingxi Zhao
563ceb7724 fix: bandit 2026-01-15 03:21:25 +08:00
Bingxi Zhao
5ffa8405a9 update 2026-01-15 02:55:11 +08:00