A piano keyboard in the DeepSeek Harness UI: click a key to play it, or hold and drag sideways for a glissando across the keys. Notes are synthesized live with Web Audio — no samples, no network, no third-party dependencies — and the volume and starting octave are remembered between sessions.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:439436269-ctrl/dsh-piano
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
在 DSH 界面里弹一条钢琴键盘:点单个键出声,按住鼠标 / 触控板横向滑动会像刮奏(glissando)一样连续发声。声音用 Web Audio 实时合成,零采样、零网络、零第三方依赖。
效果
- 左下角一枚 🎹 按钮(默认收起,不打扰正常使用)。按钮可拖动:按住移动超过 6px 即判定为拖(不会误开面板),松手后位置存
localStorage,下次进来仍在原处;400ms 内的click才算"点开",拖动不会吞掉下一次真正点击。 - 点开是底部居中的浮动键盘面板:音量滑块、八度移调(− / +)、收起。
- 键盘含白键 + 黑键;按住后滑动,指到哪个键就响哪个音(按住拖动 = 刮奏)。
- 设置(音量、起始八度)持久化到
localStorage,刷新后保留。
技术要点
| 项 | 做法 |
|---|---|
| 挂载槽位 | shell.overlay(常驻应用面座位) |
| 音频 | Web Audio 合成:基音 + 泛音(指数衰减)+ 高通噪声锤击瞬态 + 低通 + 压缩器防削波 |
| 刮奏 | 指针按下 setPointerCapture → pointermove 用 document.elementFromPoint 命中 data-midi 键 → 键变化即触发新音 |
| 客户端形态 | 手写 window.__ModuleLoader__.load 零构建 bundle,platform: web |
安装
dsh plugin --profile desktop add dsh-piano
装好后左下角出现 🎹 按钮(包名会进 dsh.profile.bundles,实测热载入,一般不用重启;没生效就刷新页面)。
本包是「双面」的(dsh.bundle.patch + dsh.client):Loader 行拉起空的 Host 半,浏览器半通过 exports["./client"] 到达。
本地开发安装
# 以 file:/link: 目录依赖装进 profile,并加入 bundles(或 cordis insert)
dsh plugin --profile desktop add /path/to/dsh-piano -w
# 或手写:profile/package.json 加 "dsh-piano": "link:...", 并在 dsh.profile.bundles 加 "dsh-piano"
开发
npm test # node test/bundle-check.mjs —— 断言 bundle 结构与关键 marker
客户端 bundle 用 link: 目录依赖时,改完浏览器刷新即生效;服务端半改动需重启 Host。
说明
- 首次出声需要一次用户手势(点开按钮或按下琴键即自动解锁 AudioContext)。
- 浏览器无
AudioContext(极老环境)时静默不发声。
Links
More in this category
PC2005-cloud/dsh-pet#dsh-pet★ 6896
Desktop pet for the DSH Web UI on Windows, macOS and Linux: 106 transparent animations in the browser overlay or a transparent always-on-top desktop window, throw-and-bounce drag physics with squash and particle scoring, a work-status bubble driven by live session events, self-talk and chat with persistent memory, balance display, meme-image bubbles, multiple pets on screen, and drop-in custom animations and pet packs.
flizzywine/dsh-tavern#dsh-tavern★ 1827
An agent-powered tavern for DeepSeek Harness with SillyTavern compatibility, character card imports, support for multiple models, and mobile play. Install the tavern from Settings → Tavern Launcher on desktop. A launcher derived from 2NF/dsh-profile-bridge (MIT): it downloads the tavern into a separate DSH profile and switches profiles on restart. Install this launcher or the upstream plugin, not both — they claim the same /profile-bridge channel.
Alterssss/dsh-bili-whale★ 1157
A Bilibili companion that keeps its own schedule. A 60-second tick in the plugin host wakes a dedicated agent session at a random moment inside the configured time windows (opting out of a day is a configurable chance), then hands it a bundled CLI of 38 subcommands — feed, subtitles, danmaku, comments, ffmpeg frame grabs, and two diaries. Shares at most N items a day by commenting on them and @-mentioning the owner (default 3, enforced from a written quota log, and it stops on rate-limit or captcha signals). Also polls comment replies, direct messages and live-room danmaku; replies to anyone but the owner are queued for approval in Settings. Settings → 养鱼 writes ~/.dsh/bili-whale.config.json; cookies live separately in ~/.bili-ai/credentials.json and are never echoed back. The HTTP routes are loopback-only behind DSH's trust fence. Needs Node 18+ and ffmpeg on PATH for frame extraction.
Nagi-ovo/dsh-ads★ 738
Parody ads in 2005-Chinese-web style: sidebar banners, in-chat feeds, corner popups, and a close button whose hit area is smaller than it looks. All fictional.
yyh-001/dsh-meme★ 613
Chat meme stickers: text-only send, mood auto-send, QQ/WeChat-style picker, auto-learn, custom packs.
vlln/whale-girl★ 419
Desktop pet (QQ-pet style): floats in the corner, draggable, feedable, playable.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.