Route Mastery, Book, and Immersive Reading attempts through one review record so reading quizzes are server-graded, retryable, and show the learner's pick next to the reference answer.
Co-authored-by: Cursor <cursoragent@cursor.com>
The session layer held both the decision ("is this page worth rendering?") and
the injection, and the reading capability had no way to ask the same question
without importing session internals. The predicate and the render record now
live in deeptutor/reading/page_render.py, the session helpers delegate to it,
and the viewport seed says when a rendered page is attached — a model told the
attached image is the page it is being asked about reads it instead of
guessing. With no render the seed is byte-for-byte what it was.
Extracting a PDF's raster images is not enough for slide decks: the diagrams
are usually vector drawings, and the rasters inside them are the shading
fragments. On a real lecture page — two charged-shell diagrams with Gaussian
surfaces and the field formulas — the four "figures" reaching the model were
186x91pt pink shading blocks, and the honest answer was "these are decorative
bars, not plots".
So when the open page's content is mostly drawn (>= 8 drawing objects) the
page itself is rendered — labels, formulas and all — and rides first in the
turn's image attachments, with the page's own rasters behind it. The ceiling
stays at four images per turn, the render is 110dpi/JPEG (~132KB, ~60ms) and
any failure degrades to the previous behaviour. Pages that are only typed skip
the render: their text already reaches the model.
Stored captions do nothing by themselves, so both text paths now show them.
read_material's embedded-image list gains the description after each file
name, which is what lets a question about another page — or another deck —
be answered from figures the model never received. The reading viewport seed
adds one compact line for the open page, so a text-only model still learns
what its figures show when image input is unavailable.
When nothing is captioned the output is byte-for-byte the previous text
(asserted by test, including the store-raising path); the rendering moved to
media_notes.py to keep tools.py under its size ceiling (763 -> 728 lines).
A figure only reaches the model while its page is the open one: the viewport
injection carries at most four images, and read_material returns text. That
leaves a question spanning several pages of a deck (or several decks)
answered without ever seeing the figures it is about.
Ingest can now describe each stored figure once, with the active vision model,
and write the description back into media.json next to the image it belongs
to. captions.py mirrors the RAG image-description pipeline: it is gated on
supports_multimodal_images(), runs at image_description_limits() concurrency
with a per-image timeout, tolerates individual failures, and returns the
number of rows it wrote. The work is best-effort by design: the upload path
schedules it as a background task that can only log, never fail an ingest.
Off by default (document_parsing.json -> image_caption, surfaced through the
document-parsing settings API), so nothing changes until the switch is on.
store.refresh_document() lands alongside it: re-extraction of an already
ingested document that keeps annotations/positions/bookmarks/assets in place,
rewrites units/media/manifest in one atomic swap, refuses to touch anything
when the raw bytes are gone or the unit count would change, and carries
existing captions over by image name so a refresh never silently discards
descriptions the API already paid for.
The reading chain only pulled embedded images out of Office files; the PDF
branch produced text alone, so a slide deck uploaded as PDF reported
media_count 0 and no [图片 N] markers at all. The chat-attachment path already
had the missing half (extract_pdf_images + per-page markers), so the reader
now reuses it: each page's figures are pinned to that page's locator and the
marker lines are appended at the END of the page text, leaving every existing
character offset — and therefore every saved annotation anchor — untouched.
Budgets differ by path. Chat attachments inflate images into one request, so
they keep the 12-image/12MB document cap; the reader stores bytes on disk and
only ever sends the open page, so reading_image_budget() allows 120 images /
60MB per document while capping each page at 4 — the same ceiling the viewport
injection applies per turn, which keeps one dense figure page from eating the
document budget. extract_pdf_images/extract_docx_rich/extract_pptx_rich now
accept an explicit ImageBudget, defaulting to the previous behaviour.
Measured on the physics decks: day03_GaussLaw.pdf goes from 0 to 63 media rows
across 23 of its 42 pages (66 candidates, 3 dropped by the per-page cap).
Bind mastery drafts before their opening turn and preserve stored session modes.
Track chat duration from submission through terminal completion. Run async reading
extensions on their event loop and allow retries after cancellable timeouts.
Allow first uploads into empty LlamaIndex knowledge bases, preserve Telegram
thread routing, parse embedding Retry-After dates, and enforce robots rules and
host pacing during documentation crawls, including redirects.
Fixes#1461Fixes#1458Fixes#1451Fixes#1448Fixes#1392Fixes#1429
Refs #1435, #1412
Reuses contributions from PRs #1462, #1452 and #1403.
Co-authored-by: sjagadee <srini.jagadeesh@gmail.com>
Co-authored-by: AoHanBei <dongaohan21@gmail.com>
Co-authored-by: Gao-Chenkai <DevChenkai@outlook.com>
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
Ship lighter isolated runtimes, richer Books and Mastery flows,
Reading/session polish, and explicit model API capabilities.
Release notes: assets/releases/ver1-6-4.md
Model configuration was one layer replicated seven times: every service
stored its own profile with its own credentials, so a single OpenRouter
key had to be pasted into five separate pages. This release splits that
in two — a **connection** holds one vendor credential and links it down
to every service that vendor can serve, and a **task model** takes the
calls nobody asks for (naming a conversation, writing the composer's
starting points) off the model picked for actual reasoning. Both are
opt-in; existing per-service profiles resolve exactly as before.
Around that: Settings drops the card grid for a persistent searchable
navigator whose landing page answers "what state am I in" instead of
repeating the directory; Mastery Path files study conversations under
their topic and opens them in the tutor rather than dropping them on
/home; the sidebar folds features into More and reorders by drag; the
reading companion is rebuilt from /home's own chat components; and the
LightRAG engine talks to the SDK directly, so its extra no longer drags
MinerU in transitively.
Also back-merges PR #1041 (Anthropic SDK 1.x temperature via extra_body)
and PR #741 (owner-only auth secret/token files), which had been merged
straight into main and never flowed back to dev.
Release notes: assets/releases/ver1-6-1.md
Gates: pre-commit 15/15, ruff clean, pytest 5802 passed, web 450 node
tests, eslint 0 errors, docs build clean.
Immersive Reading, self-configuration, and a two-way IMA library.
- Immersive Reading: a new capability that opens a document beside the
thread. New reading engine (PDF pages / slides / page-sized sections),
five reading tools, a deterministic locate pre-pass that grounds the
turn without a second LLM call, /api/v1/reading, and a reader pane with
selection, highlights, notes, and export to an annotated PDF or Markdown.
- Setup capability: inspect the install, apply a setting, install a
parsing engine, or request a credential from a chat turn. New settings
spec table; a candidate value is probed before it is committed, and API
keys never enter the model's context.
- Tencent IMA: pipeline split into transport/envelope/models/sources/
notes/media/inventory, an additive capability with five tools, and
connected libraries that can finally be enumerated (bounded listings
are reported as a lower bound).
- Retrieval: supports_rag_retrieval() replaces is_connected_kb() for the
"can I sweep this?" question, so linked / lightrag_server / ima sources
stop being silently dropped from every book.
- Notebooks: their own console at /notebook, per-notebook locks and atomic
writes, copy / move / export routes, damaged files surfaced instead of
dropped, and renaming a record no longer clears its knowledge-base link.
- Settings persistence: one lock and one atomic replace shared by every
writer of interface.json; the PUT endpoints stop writing the
defaults-merged view back to disk.
Release notes: assets/releases/ver1-5-14.md