Plugin directory / UI & Skins / dsh-web-text-drop
dsh-web-text-drop
Verified · install-tested on dsh liceses
What it does
DSH Web GUI text file drag-and-drop import plugin: drag md/txt/log/code files into page, auto-handle by content length — short content goes to input box, long content copied to workspace with readable path pasted.
Works — verified, early-stage project
DSH Web GUI text file drag-and-drop import plugin: drag md/txt/log/code files into page, auto-handle by content length — short content goes to input box, long content copied to workspace with readable path pasted. It installs cleanly and boots without issues in our testing. It's early-stage but functional.
“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.
README
dsh-text-drop
DSH Web GUI 文本文件拖拽导入插件:把 md / txt / log / 代码等文本文件拖进页面,
按内容长度自动处理 —— 短内容直接进输入框,长内容复制到工作区并粘贴可读路径。
About
DeepSeek Harness(DSH)Web GUI 的文本文件拖拽导入插件。默认的 Web 输入框只接受图片拖拽,
拖入文本文件会被当作"不支持的图片类型"丢弃;本插件补齐了这一环,并把处理方式按内容长度
自动分流:
- 短文本(<= 1000 字):内容直接插入当前会话输入框,发送前可检查、可编辑。
- 长文本(> 1000 字):由 Host 端复制到会话工作区的
.dsh/drops/目录,输入框粘贴
反引号包裹的绝对路径 —— 文件落在工作区内,模型可直接读取,无需额外授权步骤。 - 图片拖拽:完全放行原生图片附件通道,行为与默认一致。
- 拖拽体验:捕获阶段拦截文本拖入,抑制原生"拖拽图片"全屏遮罩,改为轻量中性提示,
松手立即消失、无残留。
技术要点:纯官方 NPM SDK(@deepseek-ai/*)开发,零 DSH 源码改动;Host/Client 双半区
通过 /api/dsh-text-drop/save 路由协作(loopback 信任围栏);文本识别覆盖 70+ 常见
扩展名与 MIME;文件落盘路径由会话工作区决定,重名自动去重,10MB 内容上限保护传输。
行为
| 拖入内容 | 处理方式 |
|---|---|
| 文本文件,内容 <= 1000 字 | 内容直接插入当前会话输入框(可检查后发送) |
| 文本文件,内容 > 1000 字 | Host 复制到 <会话工作区>/.dsh/drops/ 目录,输入框粘贴反引号包裹的绝对路径;文件落在工作区内,模型可直接读取(workspace-write 策略,无需额外审批) |
| 图片 | 完全放行给原生图片附件通道,行为不变 |
| 混合拖入 | 仅导入文本文件,toast 提示图片请单独拖入 |
其他细节:
- 文本识别:70+ 常见文本扩展名(md/txt/log/json/yaml/py/ts/...)+
text/*MIME + Makefile/README 等无扩展名惯例名。 - 拖拽过程中抑制原生"拖拽图片"全屏遮罩(其 dragenter/dragover 被捕获阶段掐断),改为轻量中性提示;松手立即消失,不残留。
- 大文件路径带重名去重(
name.md、name-1.md、name-2.md...)。 - 内容上限 10MB(超出提示不导入)。
- 落盘目录
.dsh/drops/位于会话工作区内,由会话的 cwd 决定(内存会话 -> 持久化 meta -> sandbox 工作区根,逐级兜底)。
组成
| 半区 | 入口 | 职责 |
|---|---|---|
| Host | src/index.ts + src/routes.ts |
注册 /api/dsh-text-drop/save 路由(loopback 信任围栏),把大文件写入工作区 .dsh/drops/ |
| Client | src/client/index.ts |
document 级捕获阶段拖拽监听、文本识别、输入框写入、遮罩与 toast(经 shell.overlay / conversation.input.left 插槽) |
纯官方 NPM SDK(@deepseek-ai/*)开发,不修改 DSH 源码。
构建
pnpm install
pnpm build # tsc 类型声明 + tsdown(node 半区 lib/index.js + 浏览器半区 lib/client.js)
安装到 dsh web profile
dsh plugin --profile web add link:D:/developing/DSH-plugin/dsh-text-drop
或手动等价步骤(junction + patch 行):
New-Item -ItemType Junction -Path "$env:USERPROFILE\.dsh\profiles\web\node_modules\@icelily\dsh-text-drop" -Target "D:\developing\DSH-plugin\dsh-text-drop"
# 在 ~/.dsh/profiles/web/cordis.patch.yml 的 insert 列表追加:
# - id: text-drop
# name: '@icelily/dsh-text-drop'
然后重启 dsh web(client 端刷新页面即生效;host 端路由重启后加载最新代码)。
卸载
Remove-Item "$env:USERPROFILE\.dsh\profiles\web\node_modules\@icelily\dsh-text-drop"
# 移除 cordis.patch.yml 中的 text-drop 行,重启 dsh web
验证
- 拖短 md:内容出现在输入框,toast「已将 1 个文本文件内容插入输入框」。
- 拖长 md:toast「文件较大(...字),已复制到工作区并粘贴路径」,输入框出现反引号路径;文件在
<工作区>/.dsh/drops/下。 - 拖图片:正常进入附件栏,原生图片通道不受影响。
- 拖拽悬停:中央虚线提示,松手即消失,无残留遮罩。
Install
Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:
dsh plugin add dshbase-catalog Then say "install dsh-web-text-drop for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.
This plugin is GitHub source (not published to npm) — install it straight from the repo:
Web profile:
dsh plugin --profile web add github:liceses/dsh-web-text-drop Headless (CLI) profile:
dsh plugin --profile headless add github:liceses/dsh-web-text-drop Test report
Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.
When to use it
Change how dsh looks or how you interact with it — a theme, a skin, or a new panel that reshapes the workspace.
Who it's for
Users who spend hours in the web UI and want it to look and feel the way they work.
For developers — extending it
Skins, panels, and theme tokens are the extension points — author a new skin, add a panel, or sync tokens with an upstream palette.