Skip to content

v0.3.9 - Local-path source tracking and UI polish

Latest

Choose a tag to compare

@Soren-ABT Soren-ABT released this 02 Sep 07:40
· 1 commit to main since this release

自 v0.3.8 以来的完整功能(对应 npm 0.3.9)

This release packs everything since v0.3.8 (corresponds to npm 0.3.9).


本地路径导入与来源追踪

  • 支持通过绝对路径导入文件:现在可以直接从本地绝对路径导入单个文件,无需先复制或上传到管理面板。每个顶层文件来源都会保留稳定的来源 ID、来源类型和原始路径,便于后续检查和重新索引。
    Single files can now be imported directly from an absolute local path. Each top-level source retains a stable source ID, source type, and original path for later inspection and reindexing.

  • 支持递归导入本地目录:可以将完整目录树作为一个持续维护的来源导入。重新扫描时会自动加入新文件、重建已修改文件,并移除磁盘上已经不存在的文件。
    Complete local directory trees can be imported as durable sources. Rescans add new files, rebuild changed files, and remove files that no longer exist on disk.

  • 目录导入支持部分成功:单个文件解析失败时,不再导致整个目录导入结果含糊不清。服务端会返回逐文件错误,管理界面也会显示失败项目,同时保留已经成功导入的文档。
    Directory imports now report per-file failures while preserving successfully imported documents instead of hiding partial errors.


定向重指与失败安全

  • 来源路径可以安全重指:重新指定路径时,只会更新当前选中的顶层文件或目录。相对路径、其他知识库的来源 ID、嵌套子文档、类型不匹配以及不支持的来源都会被明确拒绝。
    Source repointing now updates only the selected top-level file or directory. Relative paths, cross-base IDs, nested children, source-type mismatches, and unsupported sources fail explicitly.

  • 重新索引会读取新的真实路径:单文件来源修改路径后,后续重新索引会从新路径读取内容,不再继续使用旧来源。如果文件扩展名发生变化,解析器类型也会同步更新。
    Reindexing a repointed file now reads from the new path. When the file extension changes, the parser identity is updated as well.

  • 修复跨目录同名文件冲突:不同目录根路径下具有相同相对路径的文件,现在会保存为彼此独立的原始来源副本。重新扫描或删除其中一个来源不会再误删另一个来源的数据。
    Files with identical relative paths under different directory roots now keep collision-safe raw-source copies. Rescanning or deleting one source cannot remove another source’s cached data.

  • 替换式重新索引更加安全:新内容会先完成暂存,只有在文档和分块成功写入后才替换原始副本。如果解析、分块或持久化失败,之前已经提交的原始内容仍可用于恢复。
    Replacement reindexing stages new bytes and commits them only after the new document and chunks succeed. The previously committed raw source remains recoverable if parsing, chunking, or persistence fails.


Ollama 行为修复

  • 空地址自动回退到本地 Ollama:当 Ollama embedding 地址为空时,会自动使用标准本地端点 http://127.0.0.1:11434
    An empty Ollama embedding URL now falls back to the standard local endpoint: http://127.0.0.1:11434.

  • 回退策略仅适用于 Ollama:OpenAI-compatible embedding provider 仍然要求用户显式配置服务地址,避免意外连接到错误的后端。
    The fallback is intentionally Ollama-specific. OpenAI-compatible embedding providers still require an explicit endpoint.

  • 浏览或下载模型不再修改配置:查看本地 Ollama 模型或启动模型拉取时,不会再在后台自动修改当前的 embedding provider 或模型配置。
    Browsing installed Ollama models or starting a model pull no longer changes the configured embedding provider or model behind the user’s back.


界面与本地化改进

  • 弹出菜单自动适应视口:顶层与嵌套 Portal 弹出菜单现在共享边界感知定位逻辑,在管理面板边缘打开时也会尽量保持完整可见。
    Root and nested portal popovers now share viewport-aware placement so menus remain visible near panel edges.

  • 交互行为更加一致:主题 Token、菜单关闭行为、Toast 交互以及模型设置的显式修改逻辑均得到统一和加固。
    Theme tokens, menu dismissal, Toast interaction, and explicit model-setting behaviour are now more consistent.

  • 补充中英文文案:新增本地路径导入、来源追踪、部分失败及相关界面状态的中文和英文翻译。
    Chinese and English locale entries now cover local-path import, source tracking, partial errors, and the integrated UI states.


兼容性与升级

  • 无需数据库迁移:现有 v0.3.8 数据库、文档、分块、embedding、上传来源和 URL 来源均可直接继续使用。
    Existing v0.3.8 databases, documents, chunks, embeddings, uploads, and URL sources continue to work without migration.

  • 不会自动重建索引或下载模型:升级不会触发额外 embedding 请求、索引重建或本地模型下载。
    The upgrade does not trigger automatic reindexing, additional embedding requests, or local-model downloads.

  • 检索能力保持兼容:v0.3.8 引入的 ContextWindow、自动预检索、重排和锚点续读行为保持不变。
    The v0.3.8 ContextWindow, proactive retrieval, reranking, and anchored-reading contracts remain unchanged.


质量保证

  • 单元与集成测试:322 项全部通过。

  • Benchmark v2:检索主指标保持 100%,证据顺序错误和 Token 硬预算超限均为 0。

  • 跨平台验证:Node 22.19 / 24,Windows、Linux、macOS 原生测试全部通过。

  • 真实打包验证:Ubuntu 和 Windows 均通过 npm tarball 安装、DSH 启动及生命周期检查。

  • 发布验证:类型检查、生产依赖审计策略、确定性构建及 npm 包内容校验全部通过。

    Quality: all 322 tests pass; Benchmark v2 remains fully green with zero evidence-ordering or hard-token-budget violations. Native checks pass across Node 22.19/24 on Windows, Linux, and macOS, while packed npm installation and DSH lifecycle smoke tests pass on Ubuntu and Windows.

Benchmark 数据来自仓库内固定的合成回归语料,用于防止版本升级造成能力退化,不代表所有私有知识库、文档类型或模型配置都能达到相同准确率。
Benchmark scores are deterministic regression gates on the repository’s synthetic fixtures, not an accuracy guarantee for every private corpus, document type, or configured provider.


社区贡献

感谢 ThinkForge-core 在 PRs #10#13 中提供的初始实现,包括本地路径导入、来源追踪、Ollama 行为和界面改进。原作者提交及署名已保留在合并历史中,维护者的集成修复和回归测试则以独立提交保存。

Thanks to ThinkForge-core for the original work in PRs #10#13, covering local-path import, source tracking, Ollama behaviour, and UI improvements. The contributor’s authorship is preserved in the merged history, with maintainer hardening and regression coverage kept in separate commits.


完整详细变更记录请查阅:CHANGELOG.md · Release notes: docs/releases/v0.3.9.md
Full changelog: CHANGELOG.md · Release notes: docs/releases/v0.3.9.md