When a model download proxy is configured, createProxyFetch() returned the
Response from undici's own fetch, which is not the global Response.
Transformers.js only writes `instanceof Response` results to its file cache,
so the ONNX weights were never cached and preload failed with "Unable to get
model file path or buffer." Keep undici's fetch and ProxyAgent, and re-wrap the
response body stream in a global Response.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
每次模型请求前检查总预算并裁剪工具结果副本,保留原记录、调用配对和计费,避免并行或跨轮结果累积超窗。
Fit cumulative tool results before each model request while preserving the transcript, call pairing and usage.
Verified with 121 related tests, 40 stress scenarios, Pi HTTP failure injection and independent reviews.
Tool and parameter descriptions were handed to the LLM in Chinese on every
runtime regardless of locale: the English metadata table in
packages/tools/src/tool-metadata.ts had no caller, the desktop translateTool
looked up i18n keys that exist in no locale file, and the MCP server had no
locale at all.
Fill the table for every tool whose definition text is Chinese (37 entries,
only translating what the definitions write in Chinese so the two copies
cannot drift), and route the four consumers through getLocalizedToolMetadata:
the cross-chat agent adapters, the CLI Web agent adapter, the desktop shared
tool adapter (replacing the dead translateTool), and the MCP server, which
now resolves its locale from config.locale.lang or the system locale for both
the standalone binary and the chatlab mcp subcommand.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sort each indexed segment once per request instead of scanning and sorting it for every hit. Preserve backfilled chronological neighbors and segment boundaries in both query adapters, with a large-segment regression test.
CLI dropped completed tool results from replay. Persist bounded results by call ID with error state.
CLI 续聊遗漏已完成的工具结果;按调用 ID 保存限长结果和错误状态。
Add SQLite reload regression for concurrent calls and truncated answers.
新增 SQLite 重载回归,覆盖并行调用与回答截断。
Wait for newly published CLI versions to become visible before building Docker images. Bound registry probes and the overall wait so npm outages cannot stall release jobs for hours.
Preserve partial output and token usage in CLI turns and edited UI rounds while leaving ordinary failures and cancellation unchanged. Use OutputLimitError across agent runners so incomplete turns remain visibly unsuccessful but can be reloaded and continued.
Cover real stream handling, SQLite persistence, reload, CLI continuation, and unsuccessful one-shot JSON output.
Reference the shared runtime through its source path, matching the other root integration tests. This fixes workspace dependency validation without adding a root package dependency or changing the test behavior.
Retain cumulative Agent usage from status events and emit it in the terminal done event after an error so truncated Desktop replies keep their token totals.
Cover the real Desktop Agent and stream runner alongside CLI and global entries, including partial output, completion state, and persisted usage.
停止后保留已收到的内容并落库,保存完成后才允许续聊;预处理取消不再启动请求。
Persist received content on stop before allowing continuation; skip requests cancelled during preprocessing.
Verified with SQLite reload/continuation, 140 stop scenarios and two independent reviews.
POST /_web/cache/save-to-downloads joined the caller-supplied `filename`
straight into the downloads directory:
const filePath = path.join(downloadsDir, filename)
`path.join` collapses `..`, so `{"filename":"../escaped.txt"}` resolved
one level above the downloads directory and the route wrote
attacker-chosen bytes there, returning `{ success: true }`. Any client
that can reach the route could therefore write outside the downloads
directory as the app user.
The route is registered by the shared web routes on both CLI Web and the
Electron internal API, so the fix covers both. Its own siblings already
constrain this input — merge.ts and the CLI upload route both run the
name through `path.basename` — so the missing guard here was an
oversight rather than a documented allowance.
Reject anything that is not a plain file name, and join only the
validated basename. Names the app itself sends stay unchanged: every
caller (conversation export, SQL export, screen capture) already passes a
flat file name.
Only count insight views when the page is visible and focused. Defer background activations until the first foreground transition without resuming cancelled tab dwell timers, and cover focus and visibility ordering in regression tests.
Reusing emoji cleaning also removed ordinary bracketed labels from language vocabulary. Preserve unknown bracketed text for language profiles while retaining known emoji filtering and the existing word-frequency behavior. Add a regression for annotated chat messages.
Released Chinese and Traditional Chinese clients install chatlab-import-cn from the default branch. Keep a deprecated, self-contained English entry so those commands continue to work, and document migration to the unified skill.
Separate warning titles, bodies, and closing fences with blank lines so VitePress renders the privacy notices correctly and Prettier preserves their structure.
Voice transcription normalization can remove every phrase for a member while leaving an empty member entry. Filter those entries from the result so overview and selected-member views retain their empty states.
Add a regression test for single-use transcriptions alongside another member with valid catchphrases.