DeepSeek Harness plugin

dsh-web-text-drop

Text-file drag-and-drop for the dsh web GUI: dropping md/txt/log/code files into the page inserts the content into the composer when it fits (<= 1000 characters), otherwise the host copies the file

Jump to install

Source facts

Repository
liceses/dsh-web-text-drop
Latest update
Aug 14, 2026
Category
Development & Runtime
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/liceses/dsh-web-text-drop
Plugin: dsh-web-text-drop
Author: liceses

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

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.mdname-1.mdname-2.md...)。
  • 内容上限 10MB(超出提示不导入)。
  • 落盘目录 .dsh/drops/ 位于会话工作区内,由会话的 cwd 决定(内存会话 -> 持久化 meta -> sandbox 工作区根,逐级兜底)。

组成

半区入口职责
Hostsrc/index.ts + src/routes.ts注册 /api/dsh-text-drop/save 路由(loopback 信任围栏),把大文件写入工作区 .dsh/drops/
Clientsrc/client/index.tsdocument 级捕获阶段拖拽监听、文本识别、输入框写入、遮罩与 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/ 下。
  • 拖图片:正常进入附件栏,原生图片通道不受影响。
  • 拖拽悬停:中央虚线提示,松手即消失,无残留遮罩。