4 Commits

Author SHA1 Message Date
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
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)
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)
9c18bf0705 codebase cleanup and decoupled, introduce cli operation 2026-03-13 20:42:16 +08:00