Signalight/codex-to-dsh-pet2

codex-to-dsh-pet

把 Codex 桌宠(spritesheet 图集)移植为 DeepSeek Harness 网页 GUI 桌宠的通用框架 / 适配器。

AI Analysis

核心用途是在 DSH 网页端添加趣味桌宠。适合想要将现有的 Codex 格式桌宠图集导入到 DSH 界面中,并支持鼠标跟随、位置固定等交互的用户。需要 Node.js 环境。

Package
codex-to-dsh-pet
Version
0.1.0
License
MIT
Last updated
Aug 17, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

2. 配置(可选)

name / label 不用填(自动从图集文件名推导)。只有需要改尺寸、归一化、 气泡文案等时才建 config.json

Copy-Item config.example.json config.json

config.json 字段(name/label 可省略,缺省取图集文件名):

字段说明默认
name插件名(也是 node_modules 目录名 / 注册名)图集文件名
label悬浮层里显示的标签图集文件名
spritesheetPath图集相对路径自动检测
spriteVersionNumber图集版本:1(8×9)或 2(8×11,含注视帧)自动检测(按图集尺寸 1872/2288)
size显示宽度 px120
pin初始位置(bottom-right / bottom-left / …)bottom-right
normalize可选:逐行尺寸归一化 [null, …, { s, cx, cy }, …]
look.enabled是否开启「眼睛跟随鼠标」;旧版桌宠(无注视帧)设为 falsetrue
look.deadzone注视死区(px,指针距桌宠中心小于该值不触发)28
bubble.enabled是否显示进度气泡true
bubble.maxChars流式文本截取长度140
bubble.runningText工具运行时文案({tool} 会被替换成工具名)运行中:{tool}…
bubble.workingText工作但无工具名时的文案工作中…
bubble.thinkingText思考时的文案思考中…

💡 版本自动识别:build.js 会按图集尺寸自动判断 v1/v2——高 1872px = v1 (9 行,无注视帧,自动关闭鼠标追踪),高 2288px = v2(11 行,含 16 方向注视帧, 自动开启鼠标追踪)。所以一般不需要手动设 spriteVersionNumber;只有当你的图集 不是标准尺寸时,才需要在 config.json 里显式指定。