Learner-card stems go through InlineMarkdown, which only switches to the
rich renderer for math, emphasis, code and links; a stem whose only markup
was a table reached the learner as raw pipes. Detect GFM tables and route
those stems through RichInlineMarkdown, and add markdown-table.ts (table
detection plus a blank line after each table so a trailing sentence is not
swallowed as another row).
Tests: learner-card-table.spec.tsx, markdown-table.test.ts.
Co-authored-by: Claude Code <noreply@anthropic.com>
Continues #2978 and closes#2887. Includes the original Windows file actions, integrates the changes with dev, and adds an explicit default-app action.
Co-authored-by: Botong Wu <2048400180@qq.com>
Set message-scoped lang from the reply language and add :lang(ja/ko/zh-Hant)
font stacks so Japanese/Korean/Traditional Chinese replies no longer fall
through to SimSun/Songti SC. Leave the shared SC-first Tailwind stacks alone.
Adapted the migration foundation from PR #1384 while preserving current workspace, caption and turn-admission safeguards.
Co-authored-by: XZH <cto@xzh.ai>
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.
A maths or physics tutoring turn reaches the learner with its LaTeX
intact: a Bellman question shows `$G_t = R_{t+1} + \gamma G_{t+1}$`, a
derivation shows `$\Delta = 4 - 20 = -16 < 0$`, and a bolded cue shows
its asterisks. Three separate surfaces, one cause each.
`MarkdownRenderer` refused the rich renderer whenever the variant was
`trace`, so no trace bubble could ever reach KaTeX — and
`RichMarkdownRenderer`'s entire `isTrace` branch, written for exactly
this, was unreachable code. Rich is chosen by what the content contains,
not by which surface shows it; a trace bubble with no math still takes
the cheap path, which is what that exclusion was really protecting.
The mastery question card and the ask_user card interpolated plain
strings. They are also short, and they sit inside `<button>` and
one-line rows, so the block renderer is the wrong tool: a `<p>` is not
valid there and brings block spacing with it. `InlineMarkdown` emits
phrasing content only and loads KaTeX at all only when the string has
something to render, so an ordinary question costs nothing. It now
renders the mastery stem, its options and its verdict explanation, and
the ask_user intro, stem, option labels and option descriptions.
Escaped-unicode decoding moved inside it, so callers no longer choose
between decoding a string and rendering it.
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.
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
Two pieces of work land together because the second is built on the
first: the provider layer was consolidated onto one spec table, then six
new providers were registered against it.
Layer overhaul
- Converge seven separate provider lists (backend registry, runtime
config, settings router, CLI wizard, frontend catalog, i18n, tests)
onto a single SEARCH_PROVIDERS spec table; every consumer derives from
it instead of keeping its own copy.
- Fix three silent defects: serper's `num` never reached the API (it was
swallowed by **kwargs, so max_results did nothing), serper dropped its
proxies, and jina had no result-count limit at all.
- A runtime failure (rate limit, timeout, unreachable network) no longer
fails the whole turn. The request walks the user's other credentialed
search profiles and finally DuckDuckGo, recording the downgrade under
a top-level `search_fallback` key so the trace shows what happened.
- Drop three provider modules that were never registered (exa, baidu,
openrouter). They stay in the deprecated list, so a stale config reads
as outdated rather than as a misspelled name.
Six new providers
doubao, bocha, zhipu, firecrawl, qianfan, aliyun_iqs — selectable under
Settings > Catalog > Search with their credential fields derived from the
spec table, and offered by `deeptutor init`. All six set
`soft_fallback=False`: five are China-hosted and the DuckDuckGo fallback
is unreachable on those networks, so a missing API key has to fail
loudly instead of silently timing out somewhere else.
Baidu returns as `qianfan` on the official Qianfan API; the old `baidu`
key stays deprecated.
* fix(web): repair malformed strong-emphasis spacing in assistant output
* style(web): keep removeEmptyMarkdownTables' loop header as dev has it
The branch reformatted an untouched line ('; )' -> ';)'). The repo's real
style is not what .prettierrc reports, so a stray prettier pass here would
land as unrelated churn in the squashed commit.
* fix(web): make the strong-emphasis repair fail-safe
The rewrite paired an opening ``**`` with the next one on the line
regardless of whether the line's markers pair off at all, so it corrupted
Markdown the renderer already handles correctly (checked against the
repo's own micromark):
- ``In Markdown, use ** to make text **bold**.`` lost its bold — the
capture was allowed to start at whitespace, so a literal ``**`` in
prose swallowed the sentence up to the next opener.
- ``**Note: **Important**`` became ``**Note:** Important**``, dropping
the bold and leaking a stray ``**``.
- ``**重點 **必讀** 內容**`` — valid nested emphasis — lost most of its
bold.
Anchor the capture at a non-space, require it to end at a colon (the
reported shape), and skip any line whose ``**`` count is odd: with an odd
count at least one marker is literal or unclosed, and there is no way to
tell which two were meant to pair. Bailing out is free — the line then
renders exactly as it does without this repair. Also skip indented code
blocks, which are shown verbatim and are not masked with the fenced ones.
---------
Co-authored-by: Bingxi Zhao (Frank) <13051345080@163.com>
Memory. A v1.5.7 source deployment grew past 14 GB before V8 aborted; the
causes were independent, so this cut fixes each one and bounds what was
previously unbounded.
- The dev server was never actually capped: `next dev` renders in a worker it
spawns, and V8 flags in argv are not inherited, so
`node --max-old-space-size=4096 .../next dev` never reached the process
holding the memory. Next then substituted 50% of total RAM — a 12 GB heap on
a 24 GB machine. web/scripts/dev.mjs routes the ceiling through NODE_OPTIONS
(which the worker inherits and Next honors), clamped to 4 GB and sized off
the cgroup limit in a container.
- Source installs serve a production build: `deeptutor start` builds once into
.next-deeptutor and reuses it until a fingerprint over the web/ tree, the
version file, or the build-time public settings changes. `--dev` is the
opt-in for HMR and keeps using .next, so neither mode invalidates the other.
- LLM clients and providers come from a bounded event-loop-local LRU pool of 2
instead of one per turn, closed on shutdown and retired on a settings
reload; only the selected backend's SDK is imported.
- Caches gained ceilings: knowledge-task log streams cap events and bytes per
task with a 1h TTL and a completion tombstone, the completed-task table
keeps 256, the LlamaIndex index cache drops 8 -> 2 with a 10-minute idle
evict, and a book runtime is released when its queue drains.
- After a turn, a finished book job, or a completed KB task, cycles are
collected and glibc is asked to return free pages via malloc_trim; the
container and launcher set MALLOC_ARENA_MAX=2 and a lower trim threshold,
both operator-overridable.
- Every uvicorn launch sets --timeout-keep-alive 300. web/proxy.ts forwards
over Node's http.globalAgent, whose 5s idle reaper matched uvicorn's default
exactly; both ends raced to close the same socket and the loser's request
died with ECONNRESET ("Failed to load sessions").
- deeptutor.agents, deeptutor.core.agentic, provider_core, the document
extractor's parser libraries and the LLM error-mapping rules resolve on
first use. `python -m deeptutor.api.run_server` no longer reloads by
default (DEEPTUTOR_DEV_RELOAD=1 restores it).
README prose and all ten translated READMEs now describe the production-build
default instead of dev mode. Release notes: assets/releases/ver1-5-8.md
Per-account MCP Services and CLI Apps — the two ways a deployment plugs in
tools DeepTutor never shipped — plus the isolation that makes them safe on a
shared install.
- MCP Services: a 45-entry curated store of hosted servers each account
installs for itself, OAuth 2.1 (PKCE + dynamic client registration) for the
servers that require it, static keys held by reference and resolved in memory
at connect time, stdio refused for self-service. Settings no longer
configures MCP; /settings/mcp redirects to the store.
- CLI Apps: 101 tools snapshotted from the two CLI-Anything registries.
Installs are admin-only, the registry's install_cmd is parsed into an argv we
build rather than executed, npm install scripts are forced off, and 66
first-party entries are pinned to one reviewed commit. Apps land in
data/cli-apps, one environment each, mounted read-only into the runner.
- Credentials that authorise a person move to data/system, the one branch the
exec sandbox never mounts: Codex tokens relocate themselves on first use
(refusing to follow a symlink), per-user MCP configs and keys land beside
them.
- Grants gain a cli_apps whitelist with the same deny-by-default posture as
MCP tools; a per-turn registry view keeps one owner's provider tools out of
the process-global registry and refuses an unauthorised tool at execute, not
just in the manifest.
- The composer reports what filled this turn's context window, a gutter rail
jumps back through long conversations, and the workspace collapses to a
drawer on small screens.
- The composer keeps focus after sending and across tab switches (#720);
released images carry provenance and SBOM attestations (#722).
README prose, all ten translated READMEs, and the docs-site pages that named
Settings → MCP are updated to match. Release notes:
assets/releases/ver1-5-7.md
Routes the remaining admin, sign-out, confirm-dialog and toast copy through i18next and adds the matching en/zh entries, so switching DeepTutor to Chinese no longer leaves account management in English.
Pre-commit auto-fixes from the project's pinned prettier (alpha.8).
Pure formatting — long object/array literals and assert.equal() calls
broken across multiple lines to satisfy print-width. No logic changes.
Files: code-block-themes registry, RichCodeBlock renderer, AppShell +
SettingsContext plumbing, appearance settings page, and the 6 affected
test files. Also adds a missing trailing newline to
app-shell-storage-code-block.test.ts.
Follow-up to #615/#608/#634: the isComposingRef + composition-handler
trio duplicated across five textareas (ComposerInput,
SimpleComposerInput, ChatMessages edit, BookChatPanel, PartnerComposer)
becomes one useImeComposing() hook; the citation-anchor fallback chain
+ <details> auto-open duplicated in both markdown renderers moves to
lib/markdown-anchors.ts; and the chat scrollport reserves the
scrollbar gutter on both edges so the message column centers on the
same axis as header and composer on classic-scrollbar platforms.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a live Python code-block preview to Settings → Appearance that uses the real RichCodeBlock renderer, so selected syntax theme, line numbers, and wrapping are visible immediately. Dynamically load the preview client-side to avoid server/client style mismatches from persisted AppShell preferences. Also use wordWrap consistently in RichCodeBlock to avoid React shorthand/non-shorthand style warnings when wrapping changes.
Add a Code blocks section to Settings → Appearance with one Prism
theme dropdown and two toggles (line numbers, wrap long lines).
Update RichCodeBlock to derive background/color from the selected
Prism style via getCodeBlockThemeBackground, route plain text
through SyntaxHighlighter so line numbers and wrapping stay
consistent, and remove the hardcoded #1f2937 dark panel so light
themes remain readable.
Add a registry of every installed Prism theme (46 options) using
individual module imports rather than the barrel, plus type
declarations for the style modules. Extend AppShell storage and
context so code-block preferences are available synchronously to
renderers outside /settings/*. Sync backend-loaded values from
SettingsContext into AppShell storage and add update helpers that
PUT only the changed field.