Always strip dollar-sign math delimiters so the voice model never says dollar. When Math speak is on (default), also convert fractions, powers, Greek, and common operators into spoken words. Settings > Voice exposes the toggle; the server applies it on every /tts call.
Ship folder-based workspaces and data migration, daily practice, redesigned
provider and model settings, and streaming conversation improvements.
Synchronize README translations and document the archive/permanent-delete
upgrade behavior in assets/releases/ver1-6-9.md.
Reduce initial JavaScript by deduplicating English resources and loading
animation features after hydration. Keep the existing route size budgets.
Update regression fixtures and browser audits for scoped URLs and the new
settings and learning interfaces.
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>
The study screen refetched the topic on one signal: a revision bump from the
mastery WebSocket, or the REST reconcile that window focus, visibility and
`online` trigger. There is no polling, no turn-end refresh, and the screen
never called `activity.refresh()` — the three existing calls are all on the
topic detail page. So a proxy that will not upgrade WebSockets, or a
connection an idle timeout closed, leaves the outline rail frozen at whatever
it read when the page opened, until the learner switches windows and comes
back — which someone working through a question does not do.
The end of a turn is when the map is most likely to have moved, since grading
and assessment both happen inside one. Reconciling there costs one GET on a
healthy socket and is the only thing that reports progress without one.
Two pieces of work ran on every streamed delta without producing a pixel.
The first is the working-out. ``messageSegments`` is rebuilt from scratch
whenever content arrives, so the trace — which stops changing the moment a
turn starts writing its answer — handed React a brand-new element tree on
every frame of that answer, and React cannot skip a subtree whose elements it
has never seen. Profiled over one turn: 2905 renders of the process, against
2 milliseconds total for the answer's own markdown beside it.
It now sits behind a memo keyed on what it holds rather than on the props it
is given, and a turn that has started writing its answer marks the process
above it settled, so even the event counts stop mattering. Measured the same
way afterwards: 346 renders, every remaining one during the thinking phase
where the trace really is still moving.
The second is the reveal rate. A markdown consumer re-parses its whole
document on every render, so a turn costs reveals × length — and revealing
per delta made that quadratic in the answer's own length, which is the shape
of "it streams fine at first and gets choppier the longer it runs". The rate
cap has to be in time rather than characters, because a model sending three
characters at a time sets the pace and there is nothing to reveal ahead of
it. A page-length reply is untouched; a 5KB one reveals at 20fps.
The list also handed every row a fresh onTraceToggle closure, which defeated
the memo on AssistantMessage outright: every message in the conversation
re-rendered on every delta of the turn at the bottom.
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
Ship the breaking front- and back-end runtime and route refactor,
learner and guardian flows, grounded reading, knowledge and parser
updates, and recoverable long-running streams.
Release notes: assets/releases/ver1-6-3.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.
* fix(web): pin chat to late-mounted quiz cards
QuizViewer loads after the 4s post-stream scroll window, so mastery quiz cards stay below the fold until the user scrolls. Watch [data-chat-grow] for 12s without re-pinning unrelated details expands.
Related to #955
* fix(web): extend the existing post-stream window for late viewers
The post-stream effect already existed for exactly this case — its comment
names QuizViewer — so a second, parallel MutationObserver with its own 12s
window meant two observers racing for the same pin, each unaware of the
other's deadline.
Fold the extension into that one effect: the window starts at 4s and only a
*newly appearing* ``[data-chat-grow]`` node pushes it out to 12s. Gating on
appearance rather than presence matters — presence alone is satisfied
permanently by any quiz card from an earlier turn, which would have re-pinned
the user on every later DOM mutation, the precise mis-classification the
short window exists to avoid. The teardown timer follows the current
deadline, so a turn with no late viewer stops observing at 4s as before.
---------
Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
Co-authored-by: Frank <bingxizhao@novix.science>
* fix(voice): strip MediaRecorder codec params from STT uploads
Chrome sends audio/webm;codecs=opus; OpenAI-compatible transcription APIs reject that as an unknown format.
Fixes#945
* refactor(voice): normalize the STT MIME once, at the wire boundary
The codec-parameter strip was applied at four layers: the recorder hook, the
route, the `transcribe_audio` facade, and `_post_multipart`. Only the last of
those decides what actually goes on the wire, and `openai_compat` is the sole
registered STT adapter, so the two middle copies were pure duplication —
and they made the route's contract ambiguous about who owns the value.
Keep the client-side strip (it sets the Blob type, which is what the browser
puts in the multipart part) and the adapter strip; drop the route and facade
copies along with the now-unused facade re-export. The adapter-level test
already pins the wire contract; the route test now asserts what the route
actually promises — verbatim forwarding.
---------
Co-authored-by: ZQR1101 <278034003+ZQR1101@users.noreply.github.com>
Co-authored-by: Frank <bingxizhao@novix.science>
The connected KB type landed with no way to create one and no way to
pair the add-on that fills it, so the feature was unreachable from the
app.
Connecting: a MarginNote card in the create modal's link sources. It
asks for a name and nothing else — `db_path` is deliberately not sent, so
the store's location keeps one rule and pairing, the add-on's syncs and
the capability binding cannot disagree.
Feeding it: a Devices tab on the library, with the paired-device list,
revoke, and the one-time token shown once at pairing (the server keeps
only a hash). Every call names its library through `X-MN4-KB`, which is
what makes the token findable by the syncs that present it.
The detail view's sections are now derived rather than fixed: a library
owns no raw files and builds no index, so Files / Add documents / Index
versions rendered empty against it, the header read "llamaindex ·
Default embedding" for a pipeline it never runs, Settings offered an
on-disk path that does not exist, and Retry indexing offered to re-run
nothing. Each now reports what the library actually has.
Every progress line the knowledge log box shows was a hardcoded English
string — 22 producers across the initializer, the document adder and the
router, rendered verbatim in the UI. #933 added one more ("Describing
images: m/n"), which is what surfaced the class.
Indexing runs detached from any request, so the backend has no viewer
language and the language of record lives in the browser anyway. So the
wire now carries the English `{{name}}` template plus its values, and the
frontend renders it with `t()` where the language is actually known.
`ProgressTracker.update` fills `message` from that same template, so
every consumer without i18n of its own — logs, the persisted snapshot,
the CLI — reads what it read before, and no call site spells the string
twice.
Untouched producers keep working: `progressMessage()` falls back to the
rendered `message` when no template is named.
Self-hostable PageIndex, a fileable question bank, and third-party plugins.
- PageIndex: adds PageIndex OSS as its own knowledge-base type, bound to
the base's local library and driven by the configured LLM rather than a
PageIndex API key. Retrieval moves off the built-in MCP server (removed)
onto a workflow-owned reading loop that walks the document tree.
- Question bank: addEntryToCategory shipped in v1.3.6 and was never called
from the frontend, so categories could be created but never filled. The
quiz card now uses the shared CategoryMenu, the page is rebuilt around
search / batch selection / an unfiled inbox, and a new question_bank tool
lets the tutor file questions instead of misrouting them to write_note.
- Plugins: deeptutor.plugins was imported behind a try/except but the
module never existed — implemented, plus a deeptutor.loop_capabilities
group so third-party packages can register chat-loop capabilities.
Builtins win on name collisions; broken entry points are skipped.
- Parsing: remote Apache Tika engine (TIKA_SERVER_URL), with no local
package and no model download.
- LightRAG: the three indexing knobs from #877 get inputs under their own
Indexing divider; unsupported keywords are dropped with a warning.
- Knowledge bases: uploads take a destination folder, same-named documents
from different subtrees stop dropping one another, and linked folders
keep their source-relative structure — closing #866.
- Book: a learning-capture inbox with an explicit status lifecycle, and
drift warnings scoped to the KB documents that actually changed.
- Whisper: /whisper moves out of the primary nav into Learning Space →
More Projects, credited to its contributor; the room needs its own
capability package. The reusable half is CAPABILITY_COMPLETE forwarding
of a capability-declared body and its declared extras.
- README: a Collaborate badge beside the Docs badge, in all twelve
languages.
- Lint: nosec B608 on four false-positive question-bank queries (literal
fragments only, every value bound), and three mypy fixes.
Release notes: assets/releases/ver1-5-15.md
The last piece of #866. #899 stopped a linked folder's subdirectories from
collapsing, and same-named documents no longer overwrite or vanish — but the
reporter's actual workflow still could not rebuild his tree. He added one
subtree at a time, and a browser folder pick reports each file's path
relative to the chosen directory: `应用开发/钉钉CLI/` arrives as
`钉钉CLI/...`, with no way to say it belongs under `应用开发/`. Every batch
piled up at the KB root, and the ancestor was not missing data — it was
never in the payload.
Uploads now take an optional destination folder, composed ahead of each
file's own relative path. The picker offers the KB's existing folders (and
its root, the default) once files are staged, so batching a large tree is a
matter of picking where each part goes. It runs through the same
_sanitize_rel_subdir guard as a directory upload's own path, so a crafted
value cannot escape raw/.
Listing folders is best-effort: if that call fails the picker simply does
not appear and the batch goes to the root exactly as before.
Linked-folder sync keeps its own root-relative staging and does not take a
destination prefix yet — that needs the prefix persisted per linked folder
in metadata, which is a separate change.
Adds PageIndex OSS as a knowledge-base type and moves PageIndex retrieval from traditional RAG to reasoning-based retrieval: a small workflow-owned agent loop reads the document tree instead of going through the built-in MCP server, which this removes.
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
Book is the bulk of this one. Compilation outlives the request that
started it, so a bus owned by that request dropped every background event
and "watch your book being written" degraded into a frozen page; the
stream is now owned per book by the process and survives a refresh or a
reconnect. Reading progress is finally recorded — `visited_page_ids` and
`bookmarked_page_ids` had been declared but never written for the life of
the feature — and rolls up into a completion score and weak chapters. A
book can also leave the app now, as one self-contained Markdown document,
with non-ASCII titles surviving the download.
Two scheduling defects that were invisible in production are fixed: the
same page compiled twice concurrently (billed twice, one result
discarded), and a book grinding on through a provider outage until every
chapter was half-generated. The source sweep is bounded and allocated
round-robin rather than spent on the first few knowledge bases, and
retrieval now tells indexed bases from connected pointers, so an Obsidian
vault or a remote IMA library no longer contributes zero while looking
like a source with nothing relevant. Confirming a spine shows a live
per-chapter estimate derived from the Section Architect's own templates.
Also here: three home starter suggestions built from memory recall,
mastery-path handoff moved into one module that changes lease, session
preference, and live turn together, and account-level Tencent IMA
credentials with the per-KB pair still winning.
Notes: assets/releases/ver1-5-13.md
This commit also carries the README prose sync, the eleven translated
READMEs, the release-notes archive sweep, and the version bump. Two gate
fixes ride along: the `Stamped` protocol is declared read-only so the
frozen `EntityStamp` satisfies it, and six GraphRAG adapter tests that
reached a deep `graphrag` import without guarding it now skip like their
four neighbours instead of failing where the extra is not installed.
* fix(knowledge): add GraphRAG model compatibility layer
* fix(graphrag): harden compatibility preflight
* fix: align GraphRAG compatibility with current dev
* test: skip GraphRAG config test without optional extra
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
* 文档:明确 IMA 只读连接流程
* 文档:细化 IMA 连接状态与安全边界
* 文档:制定 IMA 只读连接实现计划
* 测试:固定 IMA 知识库列表协议
* 功能:支持枚举 IMA 知识库
* 功能:新增安全的 IMA 知识库列表接口
* 修复:说明 IMA 按知识库连接状态
* 功能:增加 IMA Web 连接接口
* 功能:接入 IMA 只读知识库连接表单
* 文案:补齐 IMA 连接流程中英文
* 修复:适配 IMA 知识库列表字段
* 修复:完善 IMA 认证与凭据清理
* 格式:统一 IMA 模块代码样式
* fix: load IMA source content safely
---------
Co-authored-by: TyrionH-is-coding <TyrionH-is-coding@users.noreply.github.com>
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
* fix(web): settle scroll to bottom after loading chat history
Every message wrapper uses content-visibility: auto with
containIntrinsicSize placeholders, so the first scrollTop = scrollHeight
pin in useLayoutEffect lands on an estimated "fake bottom" before the
browser lays out real heights. Reopening a long history session could
therefore stop mid-conversation instead of at the true bottom.
- Re-arm autoscroll and re-pin with a double requestAnimationFrame after
session load completes, once real heights are laid out
- Listen for capture-phase load events in the post-stream observer so
lazy images that settle inside the window also re-pin to the bottom
* fix(web): re-pin only on a cold open, and describe the real mechanism
Two corrections to this branch's own fix:
- The re-arm and re-pin ran on every completed load, including the
background revalidate of a session painted instantly from cache. A
reader who opened a known session and scrolled up to re-read something
got yanked to the bottom when that round trip landed. Cold opens are
the case with a stale pin; gate on it, and check the abort signal
inside the queued frames so a superseded load cannot move a viewport
that now belongs to a newer session.
- The comment justified the double-rAF with ``content-visibility: auto``
and ``containIntrinsicSize`` placeholders, which do not appear anywhere
in web/. The heights that actually arrive late are lazily-loaded images
and the next/dynamic capability viewers. Same for the hook's listener:
opening a history session is not its path (that effect does not re-run
on a session switch), the window right after a stream stops is.
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
What happens while the answer is still being written. Prose that shared a
round with a tool call vanished into the trace, a truncated generation read as
the model deciding it had finished, and local indexing sat on the event loop
everything else needed.
- DSML tool calls are stripped from the stream incrementally instead of
all-or-nothing. Once a round's content channel showed markup, the rest of it
was diverted to the thinking channel, so any prose around the call left the
answer. DSMLStreamFilter suppresses only the envelope and the invoke blocks;
text before, between and after streams and persists (turn_runtime carries
answer_visible rounds into the assembled answer). An incomplete invoke is
released verbatim by flush, and a 512-char ceiling stops a stray `<` in
ordinary prose from making the live stream wait for a closing bracket.
- DSML parameter decoding consults the declared schema. DeepSeek marks
essentially every parameter string="true", arrays and objects included, so a
container argument reached the tool as a string of JSON. A parameter the
schema types array/object is parsed when the payload actually matches; the
provider's string contract still wins elsewhere. The catalog is kept when a
provider rejects native `tools` and the loop falls back to DSML — exactly
when the parser needs it.
- The round budget is three stages: exploration, a bounded settlement window
(MAX_SETTLEMENT_ROUNDS, tools still available so an already-started
interaction can finish), then one tool-less hard finish. A `length` finish is
an incomplete generation, not a decision to stop: the visible prefix is kept
and a continuation requested, under the same upper bound of exploration + 4.
- Resident memory across the process tree, at GET /api/v1/system/memory and in
the settings strip. runtime/memory_probe.py walks the tree; psutil is
imported lazily with a /proc fallback, so a missing wheel costs the strip and
not the app, and non-admins get {available: false}. The strip drops
LLM/Embedding/Search, which restated what the Models and Chat pages own.
- Local LightRAG indexing runs on a worker thread's own event loop.
RAG-Anything's local backends do synchronous graph merging and JSON
serialization inside async methods, stalling unrelated API and LLM work;
OwnerLoopBridge forwards LLM, vision and embedding calls back to the
request's loop with a copy of the caller's contextvars.
- Mastery works from the persisted question. learning/pending.py projects a
PendingQuestion into the public contract (prompt, type, label/body map) with
the expected answer server-side; ask_user renders that instead of display
data the model re-authored, and registration validates the quiz shape rather
than silently accepting a contradictory one.
- Connected KBs answer honestly about local files (empty listing, explicit 409
where a local file is required) instead of resolving a raw/ directory that
does not exist. resolve_public_output_path replaces is_public_output_path so
the new request-scoped /api/outputs endpoint authorizes and resolves in one
operation and fails closed with no request user. Visualize iframes measure
body content so they shrink as well as grow, and the chat page's model list
is fetched once behind a single-flight hook.
test_forced_finish_still_reports_the_tools_the_turn_carried asserted the old
two-stage budget (exhausted exploration = the next call is the tool-less
finish); it now drives through settlement to reach the real hard finish. Also
syncs the README prose, all ten translations, and the release-notes archive.