34 Commits

Author SHA1 Message Date
Marcello Pichini
6b00f0109c fix: combine adjacent minute and second duration units (#2684) 2026-11-30 11:32:40 +08:00
游标卡尺
69acdbd316 fix(math_animator): make the code-repair deadline configurable (#2790)
* fix(math_animator): make the code-repair deadline configurable

The render-fix loop's overall repair timeout was fixed at 180s: run_render
built CodeRetryManager without passing repair_timeout_seconds, so the knob
existed on the manager but was unreachable from settings. A long reasoning
model repairing a book animation was cancelled mid-edit at that ceiling with
no way to raise it (#2767).

Lift the deadline into a runtime setting capabilities.math_animator.repair_timeout
in main.yaml, read once in run_render through a get_math_animator_params getter
that shares the UI's coerce/clamp path. The single read site covers all three
callers (math_animator capability, visualize Manim route, book AnimationGenerator),
and an in-flight render keeps the value it started with. The apply branch only
persists when the key is present, so saving unrelated animation settings does not
shadow the loop's default (#1316 shape). Clarify both repair-timeout errors to name
the stage, the effective seconds, and that this is a local deadline rather than a
provider connection failure.

Backend only; the Settings-form field is left to a follow-up and failure-stage
diagnostics/artifact retention to #2768.

* fix(config): keep repair timeout default out of settings saves

The Settings page PUTs the full GET DTO, so exposing the runtime default caused unrelated saves to persist repair_timeout=180. Omit it until explicitly configured, cover the full round trip, and soften the timeout diagnostic.

---------

Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
2026-11-27 14:46:23 +08:00
ZQR1101
17d05d6514 fix(agents): a math animator visual review with no verdict says so (#1202) 2026-11-09 10:28:24 +08:00
Bingxi Zhao (Frank)
ce4c39d6a3 Merge commit '0095956fb4639757e632c1b6187a3065c6dd33a4' into codex/validate-reviewed-integration
# Conflicts:
#	tests/agents/math_animator/test_retry_manager.py
2026-10-31 18:53:14 +08:00
Bingxi Zhao
4b695016d4 Merge pull request #2192 from amartinawi/feat/task-model-repairs
feat: run Math Animator repairs and Video Lesson fixes on the task model
2026-10-31 18:34:55 +08:00
Bingxi Zhao
7db39b4b03 Merge pull request #2142 from 1akashkalita/fix/animation-visual-review-option
Expose opt-in visual review for generated animations
2026-10-31 18:31:15 +08:00
Bingxi Zhao (Frank)
0095956fb4 fix(math-animator): keep unavailable geometry checks advisory 2026-10-31 17:22:25 +08:00
Bingxi Zhao (Frank)
4d2678954d fix(manim): preserve review failures and reap cancelled geometry probes 2026-10-31 16:56:47 +08:00
Amar Tinawi
009f4ac560 feat: run Math Animator repairs and Video Lesson fixes on the task model
Repairs are targeted edits to a script that already exists: a render
error, a layout finding, a compile error. With a reasoning chat model
they routinely take minutes (Math Animator repairs regularly ran past
the 180 s repair timeout); the Settings task model does them in seconds.

task_model_agent(factory) builds an agent bound to the task model at its
configured reasoning level, or returns None when no task model is set.

- Math Animator: repair_agent = task-model CodeGeneratorAgent, falling
  back to the main code agent.
- Video Lesson: the first draft is still written by the chat model;
  attempts 2+ go to a task-model LessonWriterAgent that shares the same
  conversation (share_conversation), falling back to the main writer.
2026-10-30 15:18:21 +04:00
Amar Tinawi
8f1db978cc feat(math_animator): dry-run geometry check gates each render
Without a vision model the pipeline has no layout review, so overlapping
labels, lines through formulas and text cut off by the frame ship as-is.

layout_probe.py replays the scene with Manim's dry_run (no frames drawn,
a few seconds), snapshots every visible text and stroked VMobject after
each play()/wait(), and reports in scene units: text overlapping text,
strokes crossing text, and text or shapes past the (camera) frame edge.

When visual review is off and output is video, the probe runs before each
render. A failing layout is raised as a ManimRenderError, so the existing
repair loop fixes it before any frame is drawn (MAX_LAYOUT_ROUNDS = 3);
after that the scene renders as it stands, and the post-render review only
records what is left. The probe fails open: a crash or timeout skips it.

The English code-generator prompt gains layout rules and the Manim
Community API names the renderer rejects; the repair prompt says how to
fix layout findings.
2026-10-30 15:17:07 +04:00
kevin
8c76fca86e fix: read duration units only at a word boundary in the math animator 2026-10-29 18:37:52 +09:00
Akash Kalita
6e611fe5df fix: expose opt-in visual review for animations 2026-10-28 21:11:03 -07:00
Bingxi Zhao (Frank)
fbab59acbf feat: modularize installation and enforce feature dependency boundaries 2026-10-28 01:02:29 +08:00
Bingxi Zhao (Frank)
ce48fc2d4c fix(math-animator): stop truncation retries at the output ceiling (#1914) 2026-10-19 01:52:28 +08:00
Bingxi Zhao (Frank)
fe5c6fe936 fix(math-animator): keep render failure when source vanishes (#1545) 2026-09-27 05:02:08 +08:00
Bingxi Zhao (Frank)
178c1813a1 fix(math-animator): preserve render error cause and guide LaTeX repair (#1545) 2026-09-27 05:02:08 +08:00
Bingxi Zhao (Frank)
6e3dfe59ab fix(manim): retry reasoning-starved structured stages at low effort 2026-09-23 12:22:32 +08:00
Bingxi Zhao (Frank)
eabc17d79f release: v1.6.10
Native LightRAG role models: extraction, keyword, query and vision each
resolve their own model, vision indexing pins a vision-capable model
instead of silently degrading, and a knowledge base records which models
and which embedding built it. A published index refuses queries after its
embedding identity changes rather than searching a foreign vector space,
and a rebuild is confirmed against the configuration it will actually
use — a stale confirmation is rejected instead of quietly rebuilding
something else. A failed publication is withdrawn, not left half-written.

PDF attachments follow the parsing engine configured for the workspace,
report the stage they are in, and a truncated answer says it was
truncated with the counters that prove it. Providers are no longer
filtered out of the embedding picker on an unverifiable capability guess:
configure the model and test it. Visualize's temperature and token budget
are settings rather than literals. Notebook evidence no longer depends on
the chat session that produced it.

See assets/releases/ver1-6-10.md for the full notes, and the README
translations for the propagated prose.
2026-09-22 21:36:27 +08:00
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.

Release notes: assets/releases/ver1-6-5.md
2026-09-06 13:46:29 +08:00
Bingxi Zhao (Frank)
fc39543bc0 feat: integrate frontend backend and canonical routes 2026-09-01 22:24:29 +08:00
Bingxi Zhao (Frank)
02ba56793e chore: checkpoint backend stabilization workspace 2026-09-01 21:28:15 +08:00
GMyhf
0021c4d207 fix: make prompt loading and capability failures terminal (#738)
* fix: make prompt loading and capability failures terminal

* fix: handle remote knowledge base file listings

* fix: proxy uploads to LightRAG servers

* fix: show remote LightRAG document status

* fix: clarify knowledge upload confirmation

* fix(knowledge): hide reindex for connected bases

* refactor: narrow this branch to the prompt-resource fix

Split out of the original PR so #737's two halves land separately:

- The terminal-failure change to runtime/orchestrator.py is already on dev
  via #732, which shipped the same turn_terminal/status metadata. Dropped
  here rather than merged twice.
- The LightRAG Server upload forwarding and remote document listing belong
  to #755, not #737. Preserved on origin/keep/738-lightrag-server for a
  follow-up PR against that issue.
- Dropped the third prompt fallback that read the adjacent YAML with
  pathlib+yaml directly. With the cache no longer poisoned by a miss,
  reload_prompts() recovers on its own, and PromptManager stays the only
  thing that knows how to locate a prompt file.

---------

Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
2026-08-06 22:20:11 +08:00
Santh
20f5ac7acd fix(math-animator): do not treat ms as minutes in duration parsing (#681)
Bare "m" matched inside "1ms", so millisecond text became a 60s target.
2026-07-24 16:03:53 +08:00
Bingxi Zhao (Frank)
fb3c568697 fix pageindex & minor bugs 2026-07-18 19:47:03 +08:00
Bingxi Zhao (Frank)
7ac3a3ba79 release: v1.4.6
A broad consolidation release across four product surfaces.

- Learning Space: Space becomes a learning dashboard; My Agents imports
  local Claude Code / Codex chat history into resumable agents (with an
  objective explore_context briefing so the tutor never role-plays the
  user); Memory is promoted to a top-level /memory route; Partner
  conversations flow into Memory; EduHub skills install inline.
- Knowledge Center: /knowledge rebuilt as a console with per-engine
  detail pages; GraphRAG / PageIndex / LightRAG engines join LlamaIndex;
  linked-KB read-only mounts; Obsidian live-vault capability.
- Settings: pluggable document parsing (MinerU / Docling / MarkItDown)
  with a content-addressed cache and MinerU cloud/local backends; voice
  TTS/STT; image & video generation; rebuilt settings navigation.
- Platform: per-user capability gating by assigned model; Solve rebuilt
  on the chat loop with a per-step gate and mid-run failure fallback;
  username login + inline errors; CLI skill publish/update; picker
  polish; math-before-citation render fix.

Docs were split out to a standalone site, so site/ is now landing-page
only. Bumps __version__ to 1.4.6 and adds assets/releases/ver1-4-6.md.

Folds in mypy fixes surfaced by pre-commit (mineru/local Path typing,
knowledge/manager no-redef, explore_context token kwargs, CLI
set_dist_tag capability probe) plus prettier reformatting of
previously-committed web files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 10:50:44 +08:00
Bingxi Zhao (Frank)
c9d387e2b6 super super great great update 2026-06-17 00:56:27 +08:00
Bingxi Zhao (Frank)
77f29cbcc7 fix lint 2026-04-23 19:29:16 +08:00
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)
40c1a38995 fix: Windows-compatible Manim subprocess with streaming output
Replace asyncio.create_subprocess_exec with subprocess.Popen + reader
threads + asyncio.Queue. This fixes Windows SelectorEventLoop
incompatibility while preserving real-time line-by-line progress output
(unlike subprocess.run which buffers until completion).

Made-with: Cursor
2026-04-08 20:07:05 +08:00
Bingxi Zhao (Frank)
b750f5b19f refactor: use ProactorEventLoop policy instead of subprocess.run fallback
Instead of replacing asyncio.create_subprocess_exec with subprocess.run
(which loses real-time streaming and cancellation), fix the root cause:
set WindowsProactorEventLoopPolicy before uvicorn starts so that
create_subprocess_exec works correctly on Windows.

This preserves the original async streaming renderer while fixing
Windows compatibility at the event loop level.

Made-with: Cursor
2026-04-08 12:07:33 +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
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)
9c18bf0705 codebase cleanup and decoupled, introduce cli operation 2026-03-13 20:42:16 +08:00