dsh-tokensaver
DSH port of pi-tokensaver: keeps the tokensave semantic graph fresh and teaches the agent to prefer its semantic tools
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-tokensaver
DeepSeek Harness 移植版 pi-tokensaver(Pi coding agent 扩展)—— 把 tokensave 的本地语义图引擎接进 DSH,让 agent 用语义查询代替暴力 grep/读文件,大幅省 token。
它做什么
| pi-tokensaver 阶段 | DSH 中的实现 |
|---|---|
1. tokensave sync + .gitignore 卫生 | 本插件(apply 时执行 init/sync) |
| 2. 工具桥接 | cli 直连(0.2.0 起 MCP 模式已移除):tokensave tool --args ,无 serve 进程、无 MCP,工具名 tokensave_* |
| 3. 系统提示词注入 | 本插件(ctx.systemPrompt.section) |
| 4. teardown 杀进程 | 无长驻进程,无需处理 |
装好后模型会自动获得 80+ 个语义图工具(search / callers / callees / body / entities / status / dead_code / circular …),并在系统提示词中被引导优先使用它们探索代码——一次语义查询省 900–2000 token,tokensave_metrics 可量化每次调用省了多少。
安装(web profile 示例)
前置条件:
- tokensave 已安装(
cargo install tokensave,或从 GitHub Releases 下载tokensave-vX.Y.Z-x86_64-windows.zip解压后放入 PATH)。 dsh可用,且 profile 目录有pnpm(dsh plugin依赖)。
从 GitHub 安装(推荐)
dsh plugin --profile web add github:Miku196/dsh-tokensave
本地开发安装
dsh plugin --profile web add file:/path/to/dsh-tokensaver