Skip to content

v0.5.2 - local model settings crash fix, Unicode-safe truncation (emoji 400s), runtime & security audit updates

Choose a tag to compare

@Soren-ABT Soren-ABT released this 10 Oct 13:36
· 41 commits to main since this release
4e13e62

自 v0.5.1 以来的完整功能(对应 npm 0.5.2)

This release packs everything since v0.5.1 (corresponds to npm 0.5.2).


修复本地模型设置页(#47)

  • 修复了 DSH 服务注入检查导致“本地模型”设置区域空白或崩溃的问题。

  • 目录选择与打开能力改为在使用时解析,支持宿主服务晚注册或被替换的情况。

  • 保留了旧版目录接口、取消选择以及手动路径输入的兼容行为。

    Fixed the Local Models settings panel crashing or rendering blank due to DSH service injection checks; directory picker/open capabilities are now resolved lazily, supporting late registration or replacement of host services; backward compatibility for legacy directory APIs, cancel selection, and manual path input is preserved.


修复 Unicode 裁剪与请求文本(#51)

  • 检索片段、上下文窗口、文档读取及来源标签在裁剪时保留完整的 UTF-16 代理对,避免拆开 emoji 等字符。

  • 修正了证据续读起点,确保返回文本、字符偏移和分页游标保持一致。

  • 在自动检索注入、工具输出、知识库名称提示以及 embedding/rerank 输入中,将已存在的孤立代理项替换为 U+FFFD。

  • 保留了有效 emoji、存储原文、来源映射以及现有的 token 预算。

    Truncation now preserves full UTF-16 surrogate pairs across retrieval snippets, context windows, document reads, and source labels, avoiding broken emoji; evidence continuation start point corrected so text, offsets, and pagination cursors stay consistent; existing lone surrogates are replaced with U+FFFD in auto-retrieve injections, tool outputs, base name hints, and embedding/rerank inputs; valid emoji, stored originals, source mapping, and token budgets are preserved.


更新运行时与安全审计(#49)

  • 本地文本模型运行时升级至 Transformers.js 4.3.1 / ONNX Runtime 1.30.0。

  • 仓库锁定 sharp 0.35.5,修复了此前报告的三项高危依赖告警。

  • 移除了原有的 sharp 审计豁免;现在高危、严重漏洞或无效审计结果都会阻止发布检查。

    Local text model runtime upgraded to Transformers.js 4.3.1 / ONNX Runtime 1.30.0; sharp pinned to 0.35.5, resolving three previously reported high-severity dependency alerts; the old sharp audit exemption was removed – high/critical vulnerabilities or invalid audit results now block release checks.


升级说明

  • 无需数据库迁移或重新索引。

  • 已下载的模型权重会保留;升级后需要在本地模型设置页重新验证 embedding/rerank 的就绪状态。

  • 本次修复不会自动清理已经损坏的会话历史,受影响的旧会话仍需单独修复。

  • 既有 DSH profile 可能保留旧依赖,升级后应检查实际安装的 sharp 版本不低于 0.35.5。

    No database migration or reindexing required; downloaded model weights are preserved, but embedding/rerank readiness must be re-verified in the Local Models settings page after upgrade; this fix does not automatically repair already corrupted session history – affected old sessions need separate remediation; existing DSH profiles may retain old dependencies, so verify the installed sharp version is at least 0.35.5.


验证

修复代码已通过 579 项回归测试、类型检查、检索基准、构建、包检查及四个 worker 的协议检查,最新 CI 全部通过。

Validation: 579 regression tests, type checking, retrieval benchmark, build, package checks, and protocol checks for four workers all pass; latest CI is green.


感谢 InfiniteScope 提供问题复现及修复贡献。

相关 PR:

完整变更:
v0.5.1...v0.5.2

Full changelog: CHANGELOG.md
Release notes: docs/releases/v0.5.2.md