HarmlessFunny/dsh-pet-in-frame ↗★ 0

dsh-pet-in-frame

在界面显示状态宠物,并按代理动作与工具调用切换表情动画 适合希望获得可视化状态反馈的使用者,可通过本地资源目录快速自定义。

包名
dsh-pet-in-frame
兼容性
待验证
版本
0.6.0
许可证
MIT
最近更新
2026年9月13日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HarmlessFunny/dsh-pet-in-frame

Assets & configuration

Images live in the package's assets/ directory. You can point elsewhere with the DSH_PET_ASSETS environment variable or a config.assetsDir on the loader row:

- id: dsh-pet-in-frame
  name: dsh-pet-in-frame
  config:
    assetsDir: C:/path/to/your/assets

Convention mode (zero config) — assets/., extensions png/jpg/jpeg/gif/webp/svg:

assets/
├── default.png   # fallback
├── think.png     # thinking
├── search.png    # web search / code reading
└── bash.png      # optional; falls back to default.png

manifest.json — explicit control, including animations:

{
  "default": "default.png",
  "think": { "imgs": ["think1.png", "think2.png", "think3.png"], "delay": 1000 },
  "sleep": { "imgs": ["sleep1.png", "sleep2.png", "sleep3.png"], "delay": 500 },
  "bash": "bash.png",
  "read": "search.png"
}
  • String = static single image; object {imgs, delay} = frame animation.
  • Files that don't exist are skipped; a malformed manifest is ignored and the filename convention is used instead.
  • Actions missing from the manifest still resolve via the convention → fallback chain.

Asset optimization: originals are usually 1254px+ while the pet displays at most 320px — shipping them raw slows first load noticeably. Run scripts/optimize-assets.cjs to downscale to 512px WebP (~1/10 the size) in place, then update manifest.json to the .webp names.