dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Show local images read by read_image directly in the DeepSeek Harness web chat — inline thumbnail + lightbox, pure client plugin
让 DeepSeek Harness(dsh)的 Web 聊天界面直接显示 read_image 读取的本地图片:工具卡内联缩略图,点击查看原图。
Show local images read by the read_image tool directly in the dsh Web chat: an inline thumbnail on the tool card, click to open the original.
read_image 成功后,工具卡内联显示图片缩略图(长边 240px、宽高比钳制、不放大),带格式/尺寸/体积摘要行tool/result 事件,会话 resume / fork 后图片依然显示read_image 工具自身的既有门禁(纯文本模型路由下该工具会拒绝执行,本插件无能为力)imageLimits 配置read_image 的接管式注册:如果官方未来内置了 read_image 的图片卡片,两者互为替换(后加载者生效)dsh plugin --profile web add github:dblate/dsh-read-image-view
从 GitHub 源码安装时 pnpm 会拒绝执行构建脚本,按提示在你的 profile 的 pnpm-workspace.yaml 里允许后重跑(这等于授权该包在你机器上执行构建代码,请只允许你信任的源,并尽量固定 commit)。
注意以 pnpm 报错里打印的完整键为准,不同版本格式不同——pnpm 10 是裸包名,pnpm 11 是带 codeload URL 的完整键:
# $DSH_HOME/profiles/web/pnpm-workspace.yaml
allowBuilds:
dsh-read-image-view: true
# pnpm 11.x 打印的是这种完整键,用它替换上一行:
# dsh-read-image-view@https://codeload.github.com/dblate/dsh-read-image-view/tar.gz/<commit-sha>: true
免构建的替代:pnpm pack 出 tarball 后 dsh plugin --profile web add ./dsh-read-image-view-0.1.0.tgz,或发布到 npm 后 dsh plugin --profile web add dsh-read-image-view。
安装后重启 dsh web 生效(bundle 列表在启动时组合;仅 patch 层支持热重载)。
pnpm install
pnpm run check # tsc --noEmit 类型检查
pnpm run test # 组件行为测试(vitest + jsdom,7 个用例)
pnpm run build # 产出 lib/index.js(宿主半边)+ lib/client.js(浏览器半边)
免安装的活挂载(web profile 支持 patch 热重载,改完 build 即生效,刷新页面加载新 bundle):
# 追加到 $DSH_HOME/profiles/web/cordis.patch.yml
- insert:
- id: read-image-view
name: /absolute/path/to/dsh-read-image-view/lib/index.js
dsh 处于 developer preview,破坏性变更多。本插件依赖的公开扩展面:
tool.call.toolview keyed slot(按 wire 工具名注册工具卡)ctx.uiConversation.imageUrl / peekImageUrl(会话授权的附件图片 URL 服务)@deepseek-ai/dsh-client-ui-primitives 基线共享模块(Modal / StateDot / 图标)在这些扩展面上游发生不兼容变更时需要跟进适配。
MIT