Skip to content

SAG Wiki 0.4.8

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Dec 00:03
4a708be

0.4.8

  • MCP 知识库接入:MCP 客户端会收到只读使用说明;folders 支持 limit / offset 分页,大型目录不再一次返回全部子文件夹。
  • 移除与恢复单个文件:桌面端、网页端和 CLI 均可从知识库移除单个文件,原文件保留在原位置。重启服务或重建索引后,该文件仍会被排除。可在文件设置中恢复,或用 sag add 指定同一文件路径恢复并重新索引。
  • CHM 帮助文档:.chm 文件直接加入即可搜索和问答,默认开启,无需先转换成 EPUB 或下载组件。目录层级保留为文档标题,没有目录的 CHM 按首页和链接顺序整理;支持 GBK、Big5 等旧编码,插图暂只保留替代文字。
  • Windows 系统 OCR 兜底:未安装 Docling 时,可对 PDF 中少量扫描页使用 Windows 系统 OCR;单份文档最多 20 页,纯扫描超过 8 页时回退 Docling。只识别文字,不重建版面、表格或公式;安装 Docling 后可手动重新索引升级。
  • 照片多模态解析:新增独立开关,可用所选问答模型解析 JPG、PNG、WebP、GIF、BMP、TIFF 和 HEIC/HEIF 照片,PDF 仍按优先解析方式处理;默认图片提示词补充场景、主体、可见细节与图表描述,便于语义检索。
  • 聊天照片提问:桌面端和网页端问答框支持粘贴、拖入或选择照片,每轮最多 4 张;网页端先上传到运行服务的主机。照片随问题交给支持图片输入的问答模型,并保留缩略图供回看。
  • 部分索引目录可用与状态提示:文件夹因个别超大文件或监听上限处于部分索引状态时,CLI 仍可检索已索引文档,并在输出与错误流中提示跳过文件数。
  • 并行与预过滤精准匹配:sag -F 与 -E 改用并行遍历、整文件预过滤与行级匹配,单次最大返回条数提升至 10000。
  • 扩展文件类型与自定义扩展名:内置支持 SystemVerilog、Verilog、Hjson、FuseSoC 等硬件与系统代码格式及常见无后缀构建文件,sag add --types 支持任意有效纯文本扩展名并自动过滤二进制文件。
  • CLI 本地快速检索与原生 stdio MCP:sag 新增 --fast / --mode(本地 FTS5 零模型检索)与 --hops 跳数控制;新增 sag mcp --stdio 本地接入命令及 MCP match 工具。
  • 代码符号检索与精准切片:代码文件按函数、结构体、类与模块声明切片并保留符号标题,同时索引驼峰、下划线子词与相对路径。
  • PDF 按页选择性 OCR 与决策结果缓存:混合 PDF 仅对需要 OCR 的页面抽取子集并回拼;重复决策检索按索引版本与鉴权配置缓存结果,并支持可配置的 Hop-0 早停阈值。

English

  • MCP knowledge-base access: MCP clients receive read-only usage instructions, and folders supports limit / offset pagination so large directories no longer return every subfolder at once.
  • Remove and restore individual files from the knowledge base on desktop, web, or the CLI. The original file stays in place and remains excluded across restarts and reindexing. Restore it from File settings or run sag add with the same file path to index it again.
  • CHM help files can be added directly for search and answers, enabled by default with no EPUB conversion or component download. The table of contents becomes the heading structure, CHM files without one follow the home page and its links, and legacy encodings such as GBK and Big5 are supported. Images keep only their alternative text for now.
  • Windows system OCR fallback recognizes a few scanned PDF pages when Docling is unavailable: up to 20 pages per document, with pure scans over 8 pages falling back to Docling. It recognizes text only, without rebuilding layout, tables or formulas; install Docling and reindex to upgrade later.
  • Photo parsing with a vision model adds an independent switch for JPG, PNG, WebP, GIF, BMP, TIFF and HEIC/HEIF photos while PDFs keep the preferred parser. The default image prompt now describes the scene, main subjects, visible details and charts for semantic search.
  • Ask about photos in chat: the desktop and web composers accept pasted, dropped or selected photos, up to four per turn; the web workspace uploads them to the host first. Photos are sent to a vision-capable answer model with the question and stay available as thumbnails.
  • Searchable partial indexes with warnings: When a folder is partially indexed due to oversized files or watcher limits, the CLI can still search all indexed documents and reports skipped-file warnings in JSON output and stderr.
  • Parallel prefiltered exact and regex matching: sag -F and -E now use parallel traversal with whole-file prefiltering and raise the maximum result limit to 10,000.
  • Expanded file types and custom extensions: Added built-in support for SystemVerilog, Verilog, Hjson, FuseSoC, and common extensionless build files; sag add --types accepts any valid plain-text extension with NUL-byte binary sniffing.
  • Fast local CLI search and stdio MCP: Added --fast / --mode (local FTS5 search without a decision model) and --hops hop control to sag, along with sag mcp --stdio and the MCP match tool.
  • Code-aware tokenization and symbol headings: Source files are chunked along function, struct, class, and module declarations with symbol headings, alongside camelCase/snake_case sub-tokens and relative-path titles.
  • Selective per-page PDF OCR splicing and decision cache: Mixed PDFs send only OCR-needed pages and splice results back into page markers; repeated decision searches cache results per index version and credential config with optional Hop-0 early exit.

下载 / Downloads

平台 / Platform 安装包 / Installer
Windows x64 EXE
macOS Apple Silicon DMG
macOS Intel DMG