dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Lion2c/dsh-scissors
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
给 DeepSeek Harness(DSH)输入框加一个剪刀按钮:点一下,框选屏幕区域,截图直接变成输入框里的图片附件。
A scissors button for the DeepSeek Harness composer. Click it, drag a region on screen, and the PNG becomes an ordinary image attachment in the message box.
+ 按钮右侧,图标与 DSH 自带的 16×16 线性图标一致。↑ / ↓ / Home / End 切换,Enter 执行,Esc 关闭并把焦点还给按钮,点击菜单外部关闭。| 平台 | 区域选择 | 隐藏主窗口 | 依赖 |
|---|---|---|---|
| Windows | ✅ 内置 WinForms 选择器 | ✅ | .NET Framework(Windows 10/11 自带;发布包已附带编译好的 scissors.exe) |
| macOS | ✅ screencapture -i |
✅ 通过 System Events | 系统自带 screencapture;录屏需要“屏幕录制”权限,隐藏窗口需要“自动化”权限 |
| Linux | ✅ 自动选择可用后端 | ✅ X11(xdotool) |
grim + slurp、gnome-screenshot、spectacle、scrot 或 maim;隐藏窗口需要 xdotool |
Windows 已做完整的真机验证(含隐藏/恢复窗口)。macOS 与 Linux 路径按系统工具实现,未在真机上做发布前验证;如果遇到问题欢迎提 issue。
从插件市场或 npm 安装(把 desktop 换成你实际使用的 profile;Web 版通常是 web):
dsh plugin --profile desktop add dsh-scissors
然后重启 DSH(桌面版重新打开应用,命令行版重新启动 dsh web)。
本地开发时可以把目录链接进 profile:
git clone https://github.com/Lion2c/dsh-scissors.git
dsh plugin --profile desktop add link:D:/path/to/dsh-scissors
Windows 路径同样可以写成 link:D:/AIProjects/dsh-scissors。
安装后重启 DSH(或重新加载窗口),输入框 + 右侧就会出现剪刀按钮。
卸载:
dsh plugin --profile desktop remove dsh-scissors
Esc 取消本次截图;Windows 选择器也支持右键取消。菜单打开时也可以只用键盘:↑ / ↓ 选择,Enter 确认,Esc 取消。
/.dsh-scissors,只接受同源请求,并要求自定义请求头 x-dsh-scissors: capture。native/win/selector.cs,发布包同时附带预编译的 scissors.exe,可自行审计或重新编译。按钮不出现
dsh plugin --profile web why dsh-scissors。dsh-scissors 相关错误。提示“当前平台不支持截图”
native/win/scissors.exe 存在,或系统里有 csc.exe 可编译选择器。/usr/sbin/screencapture 存在,并在“系统设置 → 隐私与安全性 → 屏幕录制”里允许 DSH。sudo apt install grim slurp;隐藏窗口还需要 xdotool(仅 X11)。“截图(隐藏主窗口)”不可用或失败
截图成功但没有出现在输入框
重装后仍是旧版本
dsh web。# 安装测试依赖
npm install
# 单元 / 冒烟测试(Host 路由 + 浏览器端 SSR)
npm test
# Windows 原生选择器测试:会弹出全屏选择器并移动鼠标
npm run test:native
npm run test:native 只适用于 Windows,覆盖 Esc 取消、真实鼠标拖拽出图、隐藏/恢复前台窗口。它会短暂接管鼠标和屏幕,建议单独运行。
目录结构:
index.js Host 端:HTTP 路由、平台探测、截图后端
client.js Browser 端:按钮、菜单、Toast、附件注入
cordis.patch.yml Bundle patch,安装时插入插件
locale/{en,zh}.json 插件市场展示文案
icon.svg 插件图标
native/win/selector.cs Windows 区域选择器源码
native/win/build.ps1 重新编译脚本
native/win/scissors.exe 预编译选择器
test/ 路由、客户端和 Windows 原生选择器测试
catalog/ 插件市场条目(提交 PR 用)
重新编译 Windows 选择器(需要 .NET Framework 的 csc.exe):
powershell -ExecutionPolicy Bypass -File native/win/build.ps1
Host 端注册两个路由:
GET /.dsh-scissors/health:返回 supported、hideSupported、platform、backend、busy。POST /.dsh-scissors/capture:请求体 { "hide": true | false },返回 { image, mime, name } 或 { cancelled: true }。见 PUBLISHING.md。仓库已按 Lion2c/dsh-scissors 配置好;接下来需要发布 npm 包、给仓库加上 dsh-plugin topic,并向插件市场提交 catalog 条目。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。