dsh-web-speech-input
leozou320-ai
Voice-to-text for the DeepSeek Harness Web UI — live, editable, never auto-sends. | DeepSeek Harness 网页语音输入
PROJECT TOPICS
PROJECT README
把粘贴或拖入聊天框的图片与任意文件保存为会话工作区文件,发送时以
[Image: source: <绝对路径>] / [File: source: <绝对路径>] 文本注入消息——
图片由 modlens 读图,其他文件由模型按路径直接读取。输入框保持干净,预览条
与对话气泡内直接渲染缩略图 / 文件卡片。
.dsh-paste/,进入待发预览条(纯文本/链接拖放仍走
原生行为)pasted-* 文件)前置:已装好 DSH(dsh web 可正常运行),dsh plugin 可用(依赖 pnpm)。
从 GitHub 安装(推荐,一行命令,产物已入库无需构建):
dsh plugin --profile web add "github:LQ-1123/paste-to-workspace"
# 验证 bundle 已挂载
dsh --profile web --dump-config | grep paste-to-workspace
也可以本地路径(开发调试时)或 npm 包名安装:
dsh plugin --profile web add /path/to/paste-to-workspace
安装后重启 dsh web 生效:宿主在进程启动时通过 package.json 的
dsh.client 声明发现浏览器端 bundle,浏览器端无需额外配置。
在 Profile patch 或 overlay 中把 bundle 行设为 disabled: true:
- id: paste-to-workspace
disabled: true
删除该字段或设为 false 即可重新启用。
dsh plugin --profile web remove @dsh-user/paste-to-workspace
重启 GUI 后:
[Image: source: /Users/.../.dsh-paste/pasted-*.png](modlens
自动读图)或 [File: source: /Users/.../pasted-*.txt](模型按路径读取
文件内容);.dsh-paste/ 目录,历史消息里点击文件卡片可随时重新下载。lib/client.js):捕获阶段拦截图片粘贴与任意文件拖放 →
POST 到宿主路由 → 路径进入旁路待发列表(草稿零改动);
conversation.input.dock 预览条渲染待发项;发送时包装 sendSession 把
路径拼成 token 追加到消息(一次调用 = 一个回合);MutationObserver 把
已发送消息里的 token 显示层替换为图片/文件卡片并拆成两个气泡;拖放期间
改写宿主"图片…"提示文案。lib/index.js):POST /save 保存任意类型文件到
<会话工作区>/.dsh-paste/pasted-<时间戳>-<随机>.<扩展名>(扩展名取自原始
文件名,无扩展名文件按原名保存);GET /file?path=…[&meta=1] 回读文件 /
返回原始文件名与大小;DELETE /file?path=… 移除未发送文件。路径校验严格
(必须位于已知粘贴根目录内且匹配插件命名格式),跨站请求 403。.dsh-paste/ 保留 30 天后自动清理,历史卡片点击下载可能
404(预期行为)MIT。文件图标来自 RemixIcon(Apache-2.0),path 数据 内嵌于客户端 bundle。
.ts 被解析为视频的冲突(TypeScript 优先)CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。