dsh-plugin-addir
DSH多目录工作区管理插件 适合需要在DSH中关联、管理多个静态或动态工作区目录的用户。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:keatsyh/dsh-plugin-addir說明文件
閱讀完整 README ↗Web Profile(推荐在 Web 版使用)
dsh plugin --profile web add dsh-plugin-addir
注意:桌面端首次使用请先启动一次应用以初始化 profile,完全退出应用后再执行安装命令,随后重新打开应用
dsh plugin --profile desktop add dsh-plugin-addir
⚙️ 配置说明
所有配置项均有合理的默认值。您可以在 DSH 的插件设置页中直观调整,或在 profile 对应的 cordis.patch.yml 中进行配置覆盖:
| 配置项 | 类型 | 默认值 | 说明 |
|---|---|---|---|
enableTools | boolean | true | 是否向智能体暴露 addir_* 工具(允许模型自己增删目录) |
enableContextInjection | boolean | true | 是否在每轮对话开始前向系统提示词注入工作区目录表 |
enforceReadOnly | boolean | true | 是否在底层工具拦截对标记为只读目录的文件写入与编辑 |
defaultDirectories | Array | [] | 启动时预先关联的静态目录列表(包含 path, alias, description, readOnly) |
YAML 配置示例
- id: addir
config:
enableTools: false # 仅允许在 UI 界面中手动管理,禁止智能体自行增删
enableContextInjection: true # 保持提示词注入
enforceReadOnly: true # 开启只读保护
defaultDirectories:
- path: /data/docs/specs
alias: specs
description: API 规范文档
readOnly: true
[!TIP] 界面中所做的新增、编辑和删除操作,会实时持久化在
$DSH_HOME/storages/addir.json中,按规范化工作区根路径索引,无需担心重启丢失。
YAML 配置示例
- id: addir
config:
enableTools: false # 仅允许在 UI 界面中手动管理,禁止智能体自行增删
enableContextInjection: true # 保持提示词注入
enforceReadOnly: true # 开启只读保护
defaultDirectories:
- path: /data/docs/specs
alias: specs
description: API 规范文档
readOnly: true
[!TIP] 界面中所做的新增、编辑和删除操作,会实时持久化在
$DSH_HOME/storages/addir.json中,按规范化工作区根路径索引,无需担心重启丢失。