Files
DeepTutor/web
Bingxi Zhao (Frank) 4ef783066c feat(answer-now): per-capability fast paths instead of forced chat reroute
Each capability now owns its own answer-now branch so the early-exit
respects the capability's natural output shape:

- chat            -> synthesize markdown answer (existing behavior)
- deep_solve      -> skip planning + reasoning, jump to writer
- deep_question   -> skip ideation, emit full quiz JSON in one structured call
- deep_research   -> skip rephrase/decompose/research, write report directly
- math_animator   -> skip analysis/design/summary, KEEP code-gen + render
- visualize       -> skip analysis/review, emit renderable code in one call

The orchestrator no longer rewrites answer_now turns into chat. It now
preserves active_capability and only falls back to chat when the
originally selected capability is missing from the registry.

Shared plumbing lives in deeptutor/capabilities/_answer_now.py
(extract gate, trace summary formatter, skip notice, LLM stream
wrapper, chunk joiner). Each fast-path preserves the same result
envelope so QuizViewer / MathAnimatorViewer / VisualizationViewer
render unchanged, and prepends a "Skipped X stage(s)" notice so the
user knows it was a best-effort early exit.

Frontend: handleAnswerNow no longer overrides snapshot.capability.

Tests: rewrote the orchestrator routing tests for the new contract;
added tests/capabilities/test_answer_now.py with 28 cases covering
the helpers and every per-capability fast-path (including unparseable
JSON / invalid render_type / fence-wrapped JSON recovery, and a
math_animator test that verifies analysis/design/summary are NOT
invoked while code-gen + render ARE).

Updated v1.1.1 release notes to reflect the new design.

Made-with: Cursor
2026-04-17 23:32:45 +08:00
..
2026-01-23 01:42:25 +08:00
2026-04-11 12:23:32 +08:00
2026-03-13 01:47:38 +08:00
2025-12-28 23:45:41 +08:00
2025-12-28 23:45:41 +08:00
2026-01-23 01:42:25 +08:00
2026-01-22 23:54:45 +08:00
2026-03-29 12:45:37 +08:00
2025-12-28 23:45:41 +08:00
2026-01-15 02:49:17 +08:00