Maintenance release on top of v1.5.2.
- Themeable code blocks: Settings → Appearance gains a Code blocks panel
(syntax theme, line numbers, wrapping) applied across chat, Book, and
Co-Writer.
- My Agents connects four more coding CLIs — Gemini, Kimi, opencode, and
MiMo Code — alongside Claude Code and Codex.
- Atlas Cloud joins as an LLM provider (34 bindings total); DashScope text
embeddings route correctly and encoding_format is omitted for strict
OpenAI-compatible gateways.
- Reliability sweep: RAG coexists with an exclusive knowledge capability
(#650), DeepSeek DSML tool-call parsing (#666), autoscroll release (#649),
idempotent write_memory (#647), seeded persona presets (#659), plus Book
WebSocket streaming, partner filename/split fixes, Visualize fences, and
CLI UTF-8 input hardening.
- Packaging: cap requires-python to >=3.11,<3.14 so pip refuses 3.14 with a
readable message instead of a failed source build (#664).
Release notes: assets/releases/ver1-5-3.md
Selecting an Obsidian vault (an exclusive KnowledgeCapability) silently
dropped every co-selected LlamaIndex KB: rag was unmounted, unseeded and
unmentioned. Capabilities now declare owned_kbs (the vault / agent refs
they consume via their own tools); the pipeline keeps rag mounted,
seeded and noted for the remaining coexisting KBs, while a pure-vault
turn still mounts nothing but the owned tools + ask_user.
Fresh installs showed an empty Persona list although the docs advertise
three presets. The presets now ship as package data and are seeded into
the admin workspace on first run (idempotent, non-destructive), so they
appear as read-only presets for every user.
DeepSeek deployments without native function calling emit tool calls as
'DSML' markup in the content channel, so the exec/ppt tool never ran and
the raw markup leaked as the answer. The chat loop now diverts that
markup off the user-facing stream and, when a round yields no structured
tool_calls, extracts the invoke/parameter envelope into real tool calls
that run through the normal dispatch path.
During streaming the rAF re-pinned to the bottom every frame, so
scrolling up via the scrollbar thumb or PageUp/Home/arrows was yanked
back (wheel/touch already released). The loop now checks whether
scrollTop dropped below what it last pinned before re-pinning; a
decrease is unambiguous user intent (overflow-anchor:none means content
growth never lowers scrollTop), so it releases instead.
preferences.md is never auto-consolidated, so a repeated identical
write_memory add persisted forever as a duplicate — common in long,
tool-driven mastery turns. write_preference now short-circuits a
duplicate add to a no-op that reports the existing entry, and the tool
returns an explicit 'already saved' signal to the model.
The aliyun binding sent every model through MultiModalEmbedding.call, so
a text model (text-embedding-v3/v4) hit the multimodal endpoint and
failed with HTTP 400 'url error'. The adapter now picks the surface from
the model id (TextEmbedding for text, MultiModalEmbedding for multimodal)
via a single shared predicate, and the resolver surfaces the true
per-model endpoint so the diagnostic no longer misreports it.
On Python 3.14 pip finds no wheels for some compiled base deps (e.g.
faiss-cpu) and silently backtracks into a source build that dies with
subprocess-exited-with-error. The heavy RAG extras already carry a
python_version < '3.14' marker; capping requires-python makes pip refuse
3.14 with a readable message instead of a build failure.
#648 kept code-block appearance state in three places — AppShellContext,
SettingsContext (a duplicate useState mirror + direct cross-context setters),
and the appearance page (its own useState + a storage/event listener) — kept
in sync via a custom event and belt-and-suspenders direct setters that a test
comment admitted papered over an effect-ordering worry.
Collapse to one owner. AppShellContext (already consumed by RichCodeBlock)
holds the state and hydrates it after the SSR-safe first render. SettingsContext
now reads the values from useAppShell and its update* setters delegate to the
AppShell setters (which normalize, persist to localStorage, and notify) before
mirroring to the backend; it keeps no local copy. The appearance page reads the
values from the settings context and drops its local mirror + event listener.
Behavior is unchanged (same values render, same persistence); there is just one
source of truth instead of three. Tests updated to assert the new wiring; full
web test suite green (211).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Three cleanups to the merged code-block-theme feature:
- Restore Literal validation for theme/language on UISettingsUpdate. #648
relaxed them to str|None, letting PUT /ui persist values the app can't
render; keep the None default (for exclude_unset partial merges) but
validate any explicit value again.
- Drop the dead code_block_* defaults from interface_settings.DEFAULT_UI_SETTINGS.
That module is read only via get_ui_language() (language only); the keys were
never consumed. Display defaults live in the frontend, and the router API
round-trips saved values (None when unset), so there is one owner, not a
split-brain across two default dicts.
- Remove the redundant pytest async-compat shim from conftest.py: pytest-asyncio
is a hard dependency and pyproject already declares asyncio_default_fixture_loop_scope.
Deletes tests/multi_user/test_ui_code_block_settings.py, which asserted the
inert get_ui_settings() path; the real contract is already covered by
tests/api/test_settings_router.py.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#652 added a guard so the gateway adapter only sends encoding_format when
set, but it was a no-op: EmbeddingRequest.encoding_format defaulted to the
truthy "float", so the guard always fired and the param was still posted —
leaving the #651 HTTP 400 from gateways like SiliconFlow intact.
Fix the root cause: default encoding_format to None. The gateway adapter now
omits it unless a caller explicitly opts in, while the official OpenAI SDK
path keeps pinning "float" (that API expects it). The intentional divergence
is documented at both call sites. Adds a payload test proving the gateway
omits it by default and includes it when set.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The persistent-listener useEffect that used openBookSocket was removed in
#658 when confirm-proposal/compile-page moved onto per-operation sockets
via runBookSocketOperation. The exported helper had no remaining callers;
remove it and keep only the BookWsEvent re-export.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Models often close a fenced block on the same line as the last content.
Require only an optional newline before the closing fence so mermaid and
chart payloads are extracted instead of returned still-fenced.
json-repair wrapped a valid object plus trailing brace-prose into an array,
corrupting book/question callers that expect a single object. Prefer
raw_decode of the first JSON value before repair.
Trailing prose that contains braces made the greedy brace slice invalid, so
valid quiz payloads were dropped to {}. Decode the first JSON object instead.
Stop generic OpenAI-compatible endpoints whose hostname contains codex from being routed through the OAuth-only backend. Add a provider-registry regression test.
SiliconFlow and other OpenAI-compatible providers reject the
`encoding_format` parameter with HTTP 400. Only send it when
explicitly set by the user, matching the existing opt-in pattern
used for `dimensions` (send_dimensions flag).
Closes#651
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.
Pre-commit hook fixes after enabling ruff-format:
- conftest.py: collapse single-expr dict comprehension onto one line, add blank line before next section
- test_ui_code_block_settings.py: collapse write_text() call, add missing final newline
Configurable chat attachment limits, PageIndex retrieval by reasoning
over your documents, broader Anthropic/OpenAI model support, and a
sweep of Book / Knowledge Base / chat-UI reliability fixes. Drop-in —
no migrations.
- attachments: size caps + extraction budgets editable in Settings →
Chat → Attachments (admin), stored in system.json with CHAT_ATTACHMENT_*
env overrides; the WebSocket frame ceiling is now derived from the
total cap, fixing large uploads silently dropping the connection.
- pageindex: chat retrieves via an internal MCP server (agentic tool
calls over the document tree); search() returns the outline; ingestion
accepts PDF/Office/Markdown/text/CSV.
- llm: newer Anthropic/OpenAI models via official SDKs incl. Codex native
tools; effort-based Claude → adaptive thinking; corrected temperature-
rejection set; streamed usage counted once per completion.
- book/knowledge: rescue stuck GENERATING/PLANNING pages + reset on
failure; KB status updates on upload/sync; atomic manager writes.
- web/channels: full-width chat + single scrollbar, aligned composer,
Enter sends edited message, malformed-markdown crash fix; WeCom aligned
with SDK 1.0.8; Mastery recency weighting restored (#618).
- release notes ver1-5-2.md (v1.5.0/v1.5.1 archived to past_releases/),
__version__ bump to 1.5.2, README Releases row + one-week fold.
- README Settings/config prose + all 10 translations synced; docs
settings/knowledge/chat pages updated separately in site/.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Trailing prose containing braces made the greedy rfind slice invalid,
so parse_edits_payload silently dropped valid edits. Decode the first
JSON value like math_animator.
When max_len is 0 or negative, the cut pointer never advances and split_message loops forever.
Return the content unsplit, matching the nanobot helpers pattern.
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>
Follow-up to #631/#628: wecom's _chat_frames now uses the same
LRU-bounded OrderedDict idiom as the dedup cache (cap 1000) so
long-running bots can't grow it unboundedly, frame-body extraction is
deduped into one helper, and the dead _loop attribute is gone.
_absolutize_img_paths now skips non-string entries and refuses to
anchor traversal paths ('..' components) with a warning, so a crafted
content_list cannot point the vision stage outside the cache dir.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up to #626/#625: _build_native_provider_adapter becomes a
_NATIVE_ADAPTER_BUILDERS dispatch table with the invariant documented
(every backend in _NATIVE_TOOL_BACKENDS must have an adapter branch)
and pinned by a test; ws_require_auth reads the dt_token cookie via
_COOKIE_NAME instead of a string literal.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>