huashu-design
alchaincyf
Huashu Design 3.0 · 在 agent 里打一句话,拿回能交付的设计:网页 / App 原型 / 可编辑 PPTX / 动画 / 信息图 · 六个候选挑三个方向 · 84 种带样张的风格库 · 越用越懂你的外观账本与设计体检 · HTML-native design skill for Claude Code, Codex, Cursor & any agent
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ghc2019/dsh-qr-scanner
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness(dsh)加一个「输入图片 → 拿到二维码里的链接」的能力。
设置页里把图拖进去、选一张、或者直接 Ctrl+V 粘贴截图;也可以在对话里让 agent 读本地图片文件,拿回二维码里的链接。
jsQR、pngjs、jpeg-js 已随包 vendored,安装时不需要构建、不需要联网拉依赖。read_qr_code。拖图 / 选文件 / 粘贴 ──► 设置 → 二维码识别 ──► 链接 + 复制 / 打开
read_qr_code("a.png") ──► agent 拿到链接
设置页(Web UI)
Ctrl+V 粘贴截图(截图工具直接截完就能粘)。agent 工具 read_qr_code
kind: "url"。需要 dsh 桌面端或 Web GUI。安装宿主部分后,前端设置页需要刷新页面才出现。
dsh-qr-scanner。Ctrl+R),打开 设置 → 二维码识别。先把仓库放到本地任意目录:
git clone https://github.com/ghc2019/dsh-qr-scanner.git D:\dsh\plugins\dsh-qr-scanner
2A. 让 DSH 里的 agent 装(最省事)
对 agent 说:
用 plugin_manager 把
D:\dsh\plugins\dsh-qr-scanner这个目录作为 bundle 安装。
等价于调用 plugin_manager 的 install_bundle,target 填该目录。装完刷新页面。
2B. 手动安装(不借助 agent)
建目录链接(Windows 用 junction,不需要管理员权限):
New-Item -ItemType Junction `
-Path "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\dsh-qr-scanner" `
-Target "D:\dsh\plugins\dsh-qr-scanner"
编辑 %USERPROFILE%\.dsh\profiles\desktop\package.json,加两处:
{
"dependencies": {
"dsh-qr-scanner": "link:D:/dsh/plugins/dsh-qr-scanner"
},
"dsh": {
"profile": {
"bundles": [
// ……原有的 bundle 保持不动……
"dsh-qr-scanner"
]
}
}
}
重启 DSH(宿主部分在启动时加载),再刷新页面。
macOS / Linux:把
New-Item -ItemType Junction换成ln -s,profile 目录是~/.dsh/profiles/<配置名>/,link:后面写绝对路径。
read_qr_code 工具吗」,有就说明宿主部分已加载;Ctrl+V。read_qr_code({ "path": "C:\\Users\\me\\Desktop\\code.png" })
返回二维码里的内容,例如:
https://example.com/invite?code=ABC123&from=qr
工具返回字段:ok、text、kind(url / text)、count、format、error。
⚠️ 聊天里直接贴的图片没有宿主文件路径,agent 读不到。那种情况请用设置页(浏览器解码后把像素交给同一个解码核心)。
| 入口 | 能吃的图片 | 说明 |
|---|---|---|
| 设置页 | 浏览器能解码的任意图片:PNG、JPEG、WebP、GIF、AVIF、BMP… | 先画到 canvas 取像素,再交给宿主解码,所以格式覆盖面跟着浏览器走 |
read_qr_code 工具 |
仅 PNG / JPEG | 内置纯 JS 解码器,刻意不引入原生模块(装的时候不用构建授权) |
其他格式想走工具:先转成 PNG/JPEG。
127.0.0.1)的 /plugin/qr-scanner/decode,不经过任何第三方服务。read_qr_code 直接读本地文件,不外传。index.js):注册 agent 工具 read_qr_code 和一条 POST /plugin/qr-scanner/decode?w=&h= 路由。lib/decode.js):jsQR 做识别(inversionAttempts: 'attemptBoth' 直接覆盖反色码);整帧找不到时才切 2×2 带重叠的四块再试。client.js):settings.section 一个设置页;createImageBitmap → canvas → RGBA 像素 → POST 给宿主。jsQR 1.4.0(Apache-2.0)、pngjs 7.0.0(MIT)、jpeg-js 0.4.4(Apache-2.0)原样放在 vendor/,见 vendor/PROVENANCE.md。index.js 宿主:read_qr_code 工具 + 解码路由
lib/decode.js 解码核心(两个入口共用)
client.js 设置页 UI
vendor/ jsQR / pngjs / jpeg-js 及各自 LICENSE
locale/ 显示名与简介(中文 / English)
icon.svg 插件图标
cordis.patch.yml 挂载声明
test/smoke.mjs 自测
npm i -D qrcode react react-dom # 仅测试用
npm test
npm test 覆盖:PNG / JPEG / 反色 / 小码 / 超大图降采样 / 非法文件、工具调用(含报错路径)、设置页服务端渲染与中英文案。
改完代码后:重新 install_bundle(或重启 DSH)让宿主加载新代码,刷新页面让前端 bundle 重新加载。
A QR code reader for DeepSeek Harness (dsh). Drop, pick or paste an image in Settings → QR code reader and get the link; or let the agent call read_qr_code with a local PNG/JPEG path.
jsQR, pngjs and jpeg-js are vendored under vendor/.Install from the plugin market, or clone the repo and let the agent install the folder as a bundle (plugin_manager → install_bundle), then refresh the page.
MIT licensed.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: image。