根本原因: Stop 事件時 main.js 已從 transcript 附上最後一句助理訊息(narration), 但 renderer 的 Stop 分支寫死顯示「完成!」沒使用它,也沒把 narrationId 標記為已顯示;下一輪第一個工具事件呼叫 sayActivity 時,transcript 裡 最新的助理訊息仍是上一輪結尾、id 又沒被消費過,就被當成新話顯示出來。 影響: 對話收尾只看得到「完成!」,看不到 AI 的最後一句回覆;等使用者送出 下一句指令後,寵物反而冒出上一輪的舊訊息,時序錯亂。 修法: Stop 時若帶有 narration,氣泡直接顯示「✅ 最後一句」並消費 narrationId, 沒有才退回「完成!」;UserPromptSubmit 也先把當下 narrationId 標記為已 顯示,雙重保險。另修 release.js 只挑檔名含當前版本的產物,避免 dist/ 殘留的舊版檔案混進新 release。版號 2.0.9。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
91 lines
2.3 KiB
JSON
91 lines
2.3 KiB
JSON
{
|
||
"name": "claude-pet",
|
||
"version": "2.0.9",
|
||
"description": "Codex Pets 相容的 Claude Code 桌面寵物(spriteVersionNumber 2:9 個動作列 + 16 方向追視)",
|
||
"main": "main.js",
|
||
"private": true,
|
||
"scripts": {
|
||
"start": "electron .",
|
||
"hooks:install": "node scripts/install-hooks.js",
|
||
"hooks:uninstall": "node scripts/uninstall-hooks.js",
|
||
"autostart:install": "node scripts/autostart.js install",
|
||
"autostart:uninstall": "node scripts/autostart.js uninstall",
|
||
"autostart:status": "node scripts/autostart.js status",
|
||
"predist": "npm version patch --no-git-tag-version",
|
||
"dist": "electron-builder --win",
|
||
"pack": "electron-builder --win --dir",
|
||
"release": "node scripts/release.js",
|
||
"predist:portable": "npm version patch --no-git-tag-version",
|
||
"dist:portable": "electron-builder --win portable"
|
||
},
|
||
"devDependencies": {
|
||
"electron": "^43.4.1",
|
||
"electron-builder": "^26.0.12"
|
||
},
|
||
"author": "JianMiau",
|
||
"build": {
|
||
"appId": "com.jianmiau.claude-pet",
|
||
"productName": "Claude Pet",
|
||
"copyright": "JianMiau",
|
||
"directories": {
|
||
"output": "dist",
|
||
"buildResources": "build"
|
||
},
|
||
"files": [
|
||
"main.js",
|
||
"preload.js",
|
||
"renderer/**/*",
|
||
"lib/**/*",
|
||
"hook/**/*",
|
||
"package.json"
|
||
],
|
||
"asarUnpack": [
|
||
"hook/**/*"
|
||
],
|
||
"win": {
|
||
"target": [
|
||
{
|
||
"target": "nsis",
|
||
"arch": [
|
||
"x64"
|
||
]
|
||
},
|
||
{
|
||
"target": "portable",
|
||
"arch": [
|
||
"x64"
|
||
]
|
||
},
|
||
{
|
||
"target": "zip",
|
||
"arch": [
|
||
"x64"
|
||
]
|
||
}
|
||
],
|
||
"icon": "build/icon.ico"
|
||
},
|
||
"nsis": {
|
||
"oneClick": false,
|
||
"perMachine": false,
|
||
"allowToChangeInstallationDirectory": true,
|
||
"createDesktopShortcut": true,
|
||
"createStartMenuShortcut": true,
|
||
"shortcutName": "Claude Pet",
|
||
"deleteAppDataOnUninstall": false,
|
||
"artifactName": "${productName}-${version}-setup.${ext}"
|
||
},
|
||
"portable": {
|
||
"artifactName": "${productName}-${version}-portable.${ext}",
|
||
"unpackDirName": "ClaudePet",
|
||
"requestExecutionLevel": "user"
|
||
},
|
||
"extraFiles": [
|
||
{
|
||
"from": "pets",
|
||
"to": "pets"
|
||
}
|
||
]
|
||
}
|
||
}
|