A file manager in the right sidebar: browse every workspace file type, zoom the grid, switch compact/detailed lists, preview PDFs, Markdown, code and CSV in the panel, and rename, copy, delete, reveal or insert a file into the composer.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:lanxiake/dsh-vyra-plugins#path:/plugins/vyra-file-manager
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
在 DSH 右侧栏浏览、预览和管理工作区里的全部文件,并保留音视频原地播放。
从
dsh-vyra-media-studio改名而来。id 之外的文字都换了,/api/vyra-media/*路由与已存的偏好键保持原样,所以升级不会丢设置。
dsh plugin --profile web add dsh-vyra-file-manager
能做什么
- 在右侧栏浏览当前工作区内的全部文件:图片、视频、音频、文档、压缩包、代码与其他类型
- ✅ 网格 / 列表两种视图;列表支持树形(默认)与平铺;网格支持全局缩略图缩放(滑杆 + Ctrl 滚轮)
- ✅ 列表支持“简洁 / 详细”两档:简洁显示文件名、后缀与路径,详细再加修改日期、类型与大小
- ✅ “只看本会话文件”筛选:只显示本会话开始后创建/修改的文件,默认按更新时间倒排
- ✅ 类型筛选默认单选,
Ctrl / Cmd + 点击可多选;类型含「HTML」 - ✅ 展开右侧栏时默认打开文件管理(可在筛选面板关闭)
- ✅ 右键「复制文件 / 复制文件夹」把文件放进系统剪贴板,可直接在资源管理器粘贴
- ✅ 「在资源管理器中打开」在 Windows 上会选中该文件,文件夹则直接打开
- ✅
Ctrl / Cmd + 点击文件批量勾选,支持批量引用、复制、删除和复制地址 - ✅ 文件夹同样支持右键操作:展开/折叠、定位、引用、复制、重命名、打开所在位置、系统打开、删除
- ✅ 面包屑与文件夹弹层定位;显示隐藏文件、包含依赖/构建目录
- ✅ 时间线只列出真正产生文件改动的轮次,纯问答不再占位
- ✅ 列表默认展示对话时间线:每条用户消息一个节点,附该轮产出的文件,按今天 / 昨天 / 日期分节
- ✅ 进入面板默认开启“只看本会话文件”
- ✅ 网格、列表与预览中都可右键或点“更多”:引用到输入框、复制到文件夹、复制文件地址、重命名、打开所在位置、用系统应用打开、删除
- ✅ 文本类文档用真实内容缩略图;PDF/Office/压缩包/代码使用按类型配色的图标缩略图
- ✅ 富预览:Markdown 渲染、代码语法高亮、JSON 格式化、CSV/TSV 表格、HTML 沙箱渲染(可切源码)、纯文本
- ✅ PDF 在面板内预览;Office/压缩包等交给系统应用
- ✅ 视频/音频卡片内原地播放;点击卡片打开面板内灯箱;切换 tab 时音频继续播放
- ✅ 本地大文件通过支持 Range 的 Host 路由流式读取,可拖动进度
- 文件链接由系统点开:直链媒体在本插件内播放,其余交给浏览器
性能
- 扫描只收集文件名、扩展名与类型,不逐文件
stat - 大小与修改时间由
POST /api/vyra-media/stat按可见页批量读取(单批最多 200 条) - 扫描结果在 Host 内存缓存 15 秒,手动刷新或任何写操作立即失效
- 默认跳过
.git、node_modules、dist、build等目录;可在筛选面板选择包含 - 缩略图与文本片段只在进入视口时加载
复用成熟开源项目
不重复造轮子,重 UI 交给现成库,Host 侧交给成熟的基础包:
| 依赖 | 用途 |
|---|---|
yet-another-react-lightbox |
面板内灯箱、视频 slide、缩放、缩略图、计数、全屏(MIT) |
lucide-react |
图标(ISC) |
fast-glob |
工作区文件扫描(MIT) |
mime-types |
响应媒体类型(MIT) |
range-parser |
HTTP Range 解析(MIT) |
markdown-it |
Markdown 渲染(MIT) |
highlight.js |
代码语法高亮(BSD-3-Clause) |
播放控制使用浏览器原生 <video> / <audio controls>,不另写一套播放器。完整许可见 THIRD_PARTY_NOTICES.md。
安装
插件尚未进入本仓库的市场清单,可先从 Git 或本地目录安装:
dsh plugin add git+https://github.com/lanxiake/dsh-vyra-plugins.git#path:/plugins/vyra-media-studio
本地开发时在 profile 的 package.json 中把依赖指向本目录:
"dsh-vyra-file-manager": "link:E:/my-project/dsh-vyra-plugins/plugins/vyra-media-studio"
安装后在 profile 的 bundles 中启用 dsh-vyra-file-manager,重启 DSH。
开发
# 安装依赖
pnpm install
# 重建浏览器 bundle(修改 src/client 后必须执行)
pnpm run build:client
# Host 路由 + 客户端注册测试
pnpm test
client.js 是 src/client/ 经 esbuild 打包后的产物;不要直接手改。
文件操作边界
- 重命名、复制、删除使用 Host 进程文件系统,因此面向本地文件系统后端;远程 SSH 后端暂不支持写操作(扫描同样为本地实现)。
- “复制到…”落地为复制到工作区内的目标文件夹(在面板里操作文件系统)。
- “复制文件 / 复制文件夹”把文件列表写进系统剪贴板:Windows 走
Set-Clipboard -LiteralPath(真正的CF_HDROP,资源管理器里粘贴得到副本),macOS 走osascript的POSIX file,Linux 走xclip -t text/uri-list;其余平台直接报错而不是假装成功。 - 剪贴板与“在资源管理器中打开”只接受工作区内路径,单个请求最多 100 项。
- 删除默认走系统回收站:Windows PowerShell 回收站、macOS
~/.Trash、Linuxgio trash;失败时才提示永久删除。 - “引用到输入框”通过
conversation.input.left的 composer bridge 插入@相对路径提及。 - 文件夹操作同样使用 Host 进程文件系统:复制为递归复制,删除走系统回收站;禁止操作工作区根目录。
- HTML 预览在 opaque-origin 沙箱(
allow-scripts,但不含allow-same-origin)中运行:脚本能跑,却读不到本页的 DOM、存储和 Cookie。 <link rel=stylesheet>/<script src>/<img src>三类外链由html-asset路由代理内联成data:URL,单资源上限 2 MB、总计 8 MB、超时 5 s;内联失败时保留原引用,页面照常渲染。
文档与原型
- 设计文档
- 前端原型(纯 HTML/CSS/JS,直接打开或用静态服务器)
- 原型说明与截图:prototype/README.md
当前边界
不包含服务端缩略图生成、PDF 首页渲染、Office 内容解析、拖拽上传、远程 SSH 文件写入。
交流群
有问题、想提功能、或者想看看别人怎么用,欢迎加 QQ 群(群号 1121362543)。
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38236
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37190
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
superdesigndev/treg★ 9111
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6016
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
helloHub1212/dsh-windows-mcp★ 2563
Bridges the CursorTouch/Windows-MCP desktop automation server into DSH through the official MCP client bridge, registering its screenshot, UI tree snapshot, mouse and keyboard input, clipboard, process and registry tools as mcp__windows__* tools for the model, and adds a windows_mcp_doctor diagnostic tool. Computer Use is off by default and is switched on from the plugin panel.
sixtysevenlf/dsh-blender-plugin★ 2280
Lets a DSH agent drive a local Blender over a direct TCP channel with 15 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 228 ops across 34 families.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.