
lhh010/dsh-minigames
181Last commit Aug 13, 2026
dsh-minigames DSH plugin
This plugin adds a game panel to DSH Web UI, accessible via a small icon on the right edge. It includes 18 classic games like dino runner, Tetris, tank battle, match-3, and more. Games are fully offline, rendered with Canvas, and automatically pause when collapsed or switching tabs.
How to install the dsh-minigames DSH plugin
dsh plugin --profile web add /绝对路径/to/dsh-minigamesCopying does not run this command. Review the repository and version before installing the dsh-minigames DSH plugin.
dsh-minigames DSH plugin data source
dsh-minigames DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-minigames DSH plugin can do
- 18 offline mini-games, all playable without network
- Collapsible panel that auto-pauses play when hidden or tab is switched
- Keyboard and mouse input isolated from chat area (only active when game area is focused)
- High score persistence via localStorage per game
- Canvas auto-resizes to fit the available panel space without scrollbars
Where the dsh-minigames DSH plugin fits
- Kill time while waiting for AI model responses
- Take a quick break during debugging or code review
- Switch between multiple games for short bursts of entertainment
Who the dsh-minigames DSH plugin is for
- DSH users who want built-in entertainment inside the Web UI
- Developers who need a distraction during long build or inference waits
dsh-minigames DSH plugin limitations
- Requires DSH snapshot 20260808+ or npm release rc.5+, older versions may not work
- Game panel occupies the right half of the window by default, reducing main chat area
- All games rely on keyboard and mouse input; touch screen is not supported
dsh-minigames DSH plugin: from the repository README
Quoted from the lhh010/dsh-minigames README, the upstream source of the dsh-minigames DSH plugin. Copyright remains with the original authors.
**简体中文** | [English](./README.en.md) DSH Web UI 右侧小游戏面板:等待模型回复或修 bug 时的摸鱼神器。 - **折叠态**:浏览器右缘一条小竖条(🎮),不占空间。 - **展开态**:点击后占据窗口**右半部分**(默认 50vw,可拖左缘调整 360px–80vw), 面板内自由选择游戏。 - **游戏**(全部离线、零资源文件、Canvas 绘制): 1. 🦖 **恐龙跳一跳** —— Chrome 经典小恐龙(昼夜/雨天); 2. 🧱 **俄罗斯方块** —— 经典下落消除; 3. 🛡️ **坦克大战(带 AI)** —— 2D 坦克对战,敌军追踪 + 视线开火,共 3 波; 4. 💎 **消消乐** —— 点击消除四连通同色块,目标分过关、逐关递增; 5. 🔢 **华容道** —— 16 格数字华容道(15-puzzle),滑动方块按序排列,用时越短分越高; 6. 🐍 **贪吃蛇** —— 经典贪吃蛇,穿越边界会从对侧出现(环面地图); 7. 🔢 **2048** —— 方向键滑动合并数字,合成 2048 即达成; 8. 💣 **扫雷** —— 左键翻开、右键标旗、双击数字自动展开周围; 9. 🃏 **记忆翻牌** —— 翻开两张配对,步数越少分越高; 10. ⚫ **五子棋 vs AI** —— 15×15,AI 会进攻也会堵你; 11. 🦘 **跳一跳** —— 按住蓄力、松开起跳,落点越准加分越多; 12. 🧱 **打砖块** —— 移动挡板反弹小球,清完进入下一关、球速递增; 13. 🔨 **打地鼠** —— 30 秒限时点击打地鼠,命中 +1、打空 -1; 14. ⚫ **黑白棋 vs AI** —— 8×8 奥赛罗,角最重要,无棋可下自动让位; 15. 🐦 **Flappy** —— 点击/空格振翅穿过柱子缝隙,越远分越高; 16. 🧩 **数独** —— 9×9 标准数独,D 键切换难度,填满无冲突即胜; 17. 🟡 **吃豆人** —— 经典迷宫吃豆,力量豆可反吃幽灵; 18. 🎯 **跟枪练习** —— FPS 跟枪:锁定鼠标转视角压住三维漂移靶子,左键射击有后坐力。 - **预留扩展接口**:游戏注册表(`registerGame`),新增游戏只需实现一个接口。 - **体验细节**:折叠面板/切换标签页时自动暂停游戏、恢复时继续;每局最高分存 localStorage;键盘输入只在点击游戏区域后生效,不会劫持聊天输入框。 - **尺寸自适应**:游戏画布按面板**真实可用空间**自适应(工具条+画布+按键提示整体 始终完整展示,不出现滚动条;浏览器缩放/面板拖
Read the full READMERepository license: BSD-3-Clause
dsh-minigames DSH plugin questions
How do I install the dsh-minigames plugin?
Clone the repository, run `pnpm install && pnpm build`, then use `dsh plugin --profile web add /absolute/path/to/dsh-minigames`. Restart `dsh web` for the changes to take effect.
How do I uninstall the plugin?
Run `dsh plugin --profile web remove @dsh-external/dsh-minigames` and restart `dsh web`. The game panel will disappear from the UI.
Can I play these games on mobile?
No, the games are designed for desktop browsers with keyboard and mouse. Touch input is not supported, and the game panel is not optimized for small screens.
How do I pause a game?
You can press the `P` key during gameplay, or simply collapse the panel by clicking the small icon on the right edge. The game will automatically pause when the panel is hidden or when you switch to another tab.
Can I add my own game to this plugin?
Yes, the plugin provides a game registry (`registerGame`) that allows you to add new games. You need to implement the `MiniGameDefinition` interface and register it in the code. Refer to the source code structure for examples.