READMESource: master@3a0e5319
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 插件命令(推荐)
dsh plugin --profile web add github:futongxu9-maker/dsh-path-reveal
方式二:手动
- 把
dsh-path-reveal目录复制到~/.dsh/profiles/web/node_modules/dsh-path-reveal/ - 在
~/.dsh/profiles/web/cordis.patch.yml追加:
- insert:
- id: path-reveal
name: 'dsh-path-reveal'
- 刷新页面(或重启服务)
使用 / 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
No comments yet. Be the first to write one.