WeKnora
Tencent
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:gunduziba/dsh-tool-zg
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness (DSH) 原生 zg (zvec-grep) 代码语义与架构搜索工具插件。
让大模型智能体能够像资深架构师一样,使用自然语言理解工程宏观设计、探查业务概念,并沿着跨文件调用链路精准定位代码。
zvec-grep (zg) 是专门为 AI Coding Agent 与开发者打造的下一代混合代码检索引擎:
potion-code-16m-v2)、BM25 关键词相关度算法与底层的 ripgrep 正则搜索。zg 能秒级直达核心实现。defineTool 精简定义,单次提示词占用仅约 80 tokens。minimal(极简模式)中自动屏蔽,保证极简模式的双工具(bash + editor)纯粹性,避免上下文污染。zg 引擎,响应时间在毫秒级别。/tmp/dsh-zg-.../output.txt,并在返回内容末尾附带提示,防止长文本撑爆上下文窗口。在使用本插件之前,请确保系统中已正确安装并配置好 zvec-grep 环境:
需要 Node.js >= 22:
npm install -g @zvec/zvec-grep
配置使用本地轻量级代码嵌入模型(完全本地离线运行,支持 GPU/Metal 硬件加速,无需额外 API Key):
# 设置默认模型为 potion-code-16m-v2,在 Apple Silicon 上开启 metal 加速(Linux/Windows 可指定 cpu 或 cuda)
zg config model set local/potion-code-16m-v2 --default --device metal
启动后台守护进程以提供即时索引与极速查询响应:
zg server on
首次在某个项目工作区使用前,可快速建立语义索引(支持增量更新):
zg index /path/to/your/project
将本插件放入 DSH Web Profile 插件目录中:
cp -r dsh-tool-zg ~/.dsh/profiles/web/node_modules/
cordis.patch.yml 中挂载编辑 ~/.dsh/profiles/web/cordis.patch.yml,插入如下配置:
- insert:
- id: tool-zg
name: 'dsh-tool-zg'
config:
disabledPresets:
- minimal # 在极简模式下严格禁用 zg 工具
pm2 restart dsh-web
大模型在调用 zg 工具时支持以下参数:
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
query |
string | 是 | 语义检索词、自然语言描述、跨文件调用流或架构设计概念 |
fts |
string | 否 | 精确关键词或代码标识符(与语义搜索融合以锁定特定函数/类/字段) |
path |
string | 否 | 限制搜索的目标目录或文件路径(默认为当前工作区根目录) |
glob |
string | 否 | 文件匹配模式,如 '*.ts'、'src/**' 或排除 '!node_modules/**' |
limit |
integer | 否 | 返回的最大匹配条数(默认为 10,上限 30) |
本项目采用 MIT License 协议。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: semantic-search。