npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-attach-upload

v0.0.1

Published

Composer attachment upload for DeepSeek Harness Web: images join the built-in draft-image pipeline; other files (audio/video/Office/PDF/MD/JSON) upload to the host and are referenced in chat via the '@' mention menu.

Readme

dsh-attach-upload — 聊天框附件上传插件

作者: cystev
版本: 0.0.1
许可证: MIT

在 DeepSeek Harness Web 聊天输入框左下角添加一个 📎 按钮,支持把本地文件上传到对话中,让大模型能识别附件内容。

支持的格式

| 类别 | 扩展名 | |---|---| | 音频 | mp3 wav m4a aac flac ogg wma amr opus ape | | 视频 | mp4 mov avi mkv webm flv wmv m4v ts mpg mpeg 3gp | | Office | doc docx xls xlsx ppt pptx csv odt ods odp rtf | | PDF | pdf | | 文本 | md markdown json txt |

工作方式

  1. 点击输入框左下角的 📎 按钮(或直接拖到选择框),选择一个或多个文件。
  2. 图片(png/jpg/jpeg/webp/gif)走内置图片管线:直接进入草稿图片栏, 发送时作为真正的图片块随消息上传(与粘贴图片完全一致,模型可直接视觉识别), 不经主机上传、不产生文本引用。
  3. 其他文件以 4MB 分片上传到本机 dsh 服务(Typert Remote attachUpload 命名空间)。
  4. 文件保存在当前会话工作区.dsh-attachments/<yyyy-MM>/ 目录下(会话没有 cwd 时回退到 ~/.dsh/attachments/files/)。
  5. 聊天框不会被写入任何引用文字。上传完成的文件以芯片形式显示在 聊天框卡片内部的左上角(文件名按显示宽度只显示前 4 个汉字(即 8 个 字符宽,英文/数字按 1 个字符宽计),鼠标悬浮可看完整路径;点击 ✕ 移除)。
  6. 芯片横向排列:所有芯片在一行从左到右排开,一行放不下时自动换到 下一行;聊天框高度随芯片行数自动向下伸长。
  7. 📎 按钮与芯片完全分离:按钮独自待在工具行左下角,芯片显示在卡片 左上角,互不影响——无论上传多少文件,按钮位置纹丝不动、与左边图标 水平对齐。
  8. 在聊天框输入 @ 即可选择引用已上传的文件:菜单列出当前会话已上传的 文件,选中后在输入框插入一个文件引用芯片;发送时自动序列化为一行引用 (【附件: 文件名】路径: … | 类型: … | 大小: …),模型据此用文件工具按需读取内容。 未用 @ 选中的文件不会出现在消息里。

上限

  • 单文件 ≤ 1 GB;不支持的类型会在芯片上显示错误提示。
  • 一次可选择多个文件,全部并发上传。
  • 分片暂存目录在 DSH home(C 盘)而工作区可能在另一块盘:rename 跨盘会 报 EXDEV,主机端会自动回退为「复制 + 删除暂存」,无需用户干预。

文件结构

dsh-attach-upload/
├── package.json        # dsh.client 声明(web 平台)+ 依赖
├── lib/
│   ├── index.js        # 主机端:AttachUploadGateway(Typert Remote 服务)
│   ├── typert.host.js  # 主机端 wire 清单(typert-loader 注册)
│   └── client.js       # 浏览器端:composer 按钮 + 上传 + 芯片(ModuleLoader bundle)

安装(本机 profile)

  • 包目录:C:\Users\cyste\.dsh\profiles\node_modules\dsh-attach-upload\
  • 启用行(C:\Users\cyste\.dsh\profiles\web\cordis.patch.yml):
- insert:
    - id: attach-upload
      name: dsh-attach-upload

修改 patch 后加载器热应用(新增行无需重启 dsh,浏览器刷新页面即可生效;但已加载 插件的代码变更需要重启 dsh 才会重新导入)。移除该行即停用。

测试

test-host.mjs / test-wire.mjs / test-client-smoke.mjs(位于源码目录,未随包安装)覆盖:

  • 类型准入 / 文件名清洗 / 分片顺序校验 / 重名去重 / 大小上限;
  • md / docx / pptx / xlsx / pdf 预览抽取(含截断);
  • SRC 装饰器标记与 typert 清单结构;
  • 浏览器 bundle 的 ModuleLoader 契约、apply 挂载与组件服务端渲染。