Bundle
dsh-path-reveal
点击消息里的 Windows 绝对路径在资源管理器中打开所在文件夹(文件定位选中/目录直接打开)
- Source
- futongxu9-maker
- stars
- 2 stars
- License
- MIT
- Updated
- Updated yesterday
Readme
# dsh-path-reveal · 点击路径打开文件夹(Path Reveal)
**DeepSeek Harness 的小工具**:消息里出现的 Windows 绝对路径变成可点击元素,点击后在资源管理器中打开所在文件夹——文件用 `/select,` 定位选中,目录直接打开。
> Click any Windows absolute path in DSH messages to reveal it in Explorer (files: select in parent folder; directories: open directly).
## 功能 / Features
- 自动识别消息内联代码里的 Windows 绝对路径(盘符 `C:\...` 与 UNC `\\server\share\...`)
- 文件路径 → 打开所在文件夹并定位选中;目录 → 直接打开
- 常驻生效:页面刷新、新会话、服务重启后依然可用(宿主插件 + 客户端包)
## 要求 / Requirements
- Windows(依赖 `explorer.exe`)+ DeepSeek Harness rc.6+
## 安装 / Install
### 方式一:dsh 插件命令(推荐)
```bash
dsh plugin --profile web add github:futongxu9-maker/dsh-path-reveal
```
### 方式二:手动
1. 把 `dsh-path-reveal` 目录复制到 `~/.dsh/profiles/web/node_modules/dsh-path-reveal/`
2. 在 `~/.dsh/profiles/web/cordis.patch.yml` 追加:
```yaml
- insert:
- id: path-reveal
name: 'dsh-path-reveal'
```
3. 刷新页面(或重启服务)
## 使用 / Usage
在消息里看到形如 `C:\Users\me\project\file.ts` 的内联代码 → 直接点击,资源管理器即打开对应文件夹(文件会被选中)。
## 架构 / Architecture
- **Host**(`path-reveal.mjs`):`webServer` 注册 `POST /api/path-reveal`,校验绝对路径 + 存在性后 `spawn explorer.exe`(`/select,"..."` 语法 + `windowsVerbatimArguments` 处理含空格路径)
- **Client**(`@local/dsh-path-reveal`):识别内联代码中的 Windows 绝对路径 token,包装成可点击元素,点击 POST 到 API
## 已知细节
- Explorer 复用已开窗口时退出码为 1——属于正常结果,不视为错误
- 路径不存在时返回 `404 not-found`,客户端保持原样文本
## License
MIT
Install
dsh plugin --profile web add github:futongxu9-maker/dsh-path-reveal
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-path-reveal from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.