sqfcyily/dsh-workspace-files ↗★ 0
workspace-files
Workspace files plugin (single package): host HTTP routes for directory listing / file read / git status+diff, plus a conversation.view file-browser UI. Ships as a bundle that patches one dual-face row into the web profile.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:sqfcyily/dsh-workspace-files说明文档
阅读完整 README ↗使用
- 打开 dsh Web GUI(默认
http://127.0.0.1:3080)。 - 进入任意会话,在会话视图顶部选择「文件」标签。
- 左侧目录树:点击目录展开,点击文件查看内容。
- 若工作区是 Git 仓库:文件名右侧显示状态角标;打开文件后,右上角可在「内容 / 改动」间切换查看 diff。
工作区根目录取自当前会话的 cwd(dsh 记录的 session header),插件通过 sessionId 向宿主解析,无需手动指定路径。
配置
apply(ctx, config) 支持覆盖路由前缀(在 patch 配置中传入):
| 选项 | 默认值 | 说明 |
|---|---|---|
filesPrefix | /api/workspace-files | 文件路由前缀 |
gitPrefix | /api/workspace-git | Git 路由前缀 |
内置上限(源码常量,见 lib/index.js):
| 常量 | 值 | 含义 |
|---|---|---|
MAX_READ_BYTES | 512 KB | 单文件读取上限,超出截断并标记 truncated |
MAX_ENTRIES | 2000 | 单层目录列举上限,超出标记 truncated |
MAX_DIFF_BYTES | 2 MB | 单次 git diff 解析上限 |