cc-pets 2.1.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +42 -0
- package/CHANGELOG.zh-CN.md +42 -0
- package/CONTRIBUTING.md +68 -0
- package/CONTRIBUTING.zh-CN.md +56 -0
- package/README.md +47 -31
- package/README.zh-CN.md +39 -20
- package/Resources/Info.plist +3 -1
- package/Resources/en.lproj/InfoPlist.strings +1 -0
- package/Resources/phrases.default.en.txt +182 -0
- package/Resources/zh-Hans.lproj/InfoPlist.strings +1 -0
- package/Resources/zh-Hans.lproj/Localizable.strings +337 -0
- package/Sources/CCPets/CCPetsAppDelegate+AgentStatus.m +35 -36
- package/Sources/CCPets/CCPetsAppDelegate+Bridge.m +16 -14
- package/Sources/CCPets/CCPetsAppDelegate+Pets.m +8 -10
- package/Sources/CCPets/CCPetsAppDelegate+Private.h +33 -9
- package/Sources/CCPets/CCPetsAppDelegate+Settings.m +84 -8
- package/Sources/CCPets/CCPetsAppDelegate+Speech.m +7 -5
- package/Sources/CCPets/CCPetsAppDelegate+Update.m +104 -79
- package/Sources/CCPets/CCPetsAppDelegate.h +1 -2
- package/Sources/CCPets/CCPetsAppDelegate.m +23 -15
- package/Sources/CCPets/CCPetsCleanup.m +9 -6
- package/Sources/CCPets/CCPetsEvents.m +4 -3
- package/Sources/CCPets/CCPetsImageLoader.h +2 -1
- package/Sources/CCPets/CCPetsImageLoader.m +10 -2
- package/Sources/CCPets/CCPetsL10n.h +55 -0
- package/Sources/CCPets/CCPetsL10n.m +219 -0
- package/Sources/CCPets/CCPetsPetSize.h +10 -0
- package/Sources/CCPets/CCPetsPetSize.m +21 -0
- package/Sources/CCPets/CCPetsPhrases.h +14 -1
- package/Sources/CCPets/CCPetsPhrases.m +107 -38
- package/Sources/CCPets/CCPetsPhrasesEditor.m +100 -65
- package/Sources/CCPets/CCPetsPreviews.m +7 -6
- package/Sources/CCPets/CCPetsVersion.h +7 -4
- package/Sources/CCPets/CCPetsVersion.m +14 -6
- package/Sources/CCPets/MenuChoiceRow.m +3 -0
- package/Sources/CCPets/MenuPetSizeView.h +5 -0
- package/Sources/CCPets/MenuPetSizeView.m +73 -0
- package/Sources/CCPets/MenuToggleSwitch.m +3 -2
- package/Sources/CCPets/PetView.m +156 -94
- package/Sources/CCPets/QuotaDashboardView.m +122 -85
- package/Sources/CCPets/main.m +3 -1
- package/bin/cc-pets +21 -22
- package/bin/claude-with-pet +2 -1
- package/bin/codex-with-pet +2 -1
- package/package.json +3 -2
- package/scripts/bridge/cli.mjs +39 -38
- package/scripts/bridge/core.mjs +27 -26
- package/scripts/bridge/hook.mjs +7 -6
- package/scripts/bridge/install.mjs +24 -23
- package/scripts/bridge/mcp-server.mjs +79 -71
- package/scripts/bridge/options.mjs +7 -6
- package/scripts/bridge/reservations.mjs +6 -5
- package/scripts/bridge/store.mjs +10 -9
- package/scripts/build.sh +24 -5
- package/scripts/check-l10n.mjs +168 -0
- package/scripts/configure-updater.mjs +4 -3
- package/scripts/doctor.mjs +93 -79
- package/scripts/i18n.mjs +122 -0
- package/scripts/i18n.zsh +66 -0
- package/scripts/install-app.sh +3 -2
- package/scripts/install-claude-hooks.mjs +10 -9
- package/scripts/install-codex-hooks.mjs +7 -6
- package/scripts/install-shell-integration.sh +6 -5
- package/scripts/locales/zh-Hans.json +366 -0
- package/scripts/pet-store.mjs +45 -44
- package/scripts/uninstall-app.sh +4 -3
- package/scripts/uninstall-integrations.mjs +8 -7
- package/scripts/uninstall-shell-integration.sh +8 -7
- /package/Resources/{phrases.default.txt → phrases.default.zh-Hans.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,48 @@ English | [简体中文](./CHANGELOG.zh-CN.md)
|
|
|
5
5
|
This project follows Semantic Versioning. `package.json` is the single source of
|
|
6
6
|
truth for the version.
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2.2.1] - 2026-10-11
|
|
11
|
+
|
|
12
|
+
### Pet size and rendering
|
|
13
|
+
|
|
14
|
+
- Added **Pet Size** to the right-click menu with a live 50%–200% slider and **Reset Size** to restore 100%. Scaling keeps the pet's feet in place, refreshes cached animation frames at the new size, and persists across pet changes and restarts.
|
|
15
|
+
- Hook status cards and speech bubbles scale down with the pet below 100%, including text, icons and click targets; at 100% and above they keep their original size.
|
|
16
|
+
- Fix blurry sprites on Retina displays by decoding for at least 2x resolution and the highest connected display scale. The loader accounts for the maximum pet size and retains original images when downsampling is unnecessary.
|
|
17
|
+
|
|
18
|
+
### Pet speech
|
|
19
|
+
|
|
20
|
+
- Added **Chatter → Line Source → Pet-specific Lines / Default Lines**. Pet-specific lines override shared sections and fall back to shared lines for missing sections; default lines use only the editable `~/.cc-pets/speech.txt`. The global choice applies immediately and persists across pet changes and restarts, with pet-specific lines selected initially.
|
|
21
|
+
- Fix mixed Chinese and English in the lines editor after changing the UI language: window titles, buttons, scope labels and situation descriptions now refresh together, preserving unsaved text and the selected situation.
|
|
22
|
+
|
|
23
|
+
### Menus
|
|
24
|
+
|
|
25
|
+
- Moved **Frequency** and **Line Source** into separate Chatter submenus and removed the separators from the Chatter menu.
|
|
26
|
+
- Frequency, line source and click-reaction threshold and timing choices now keep the menu open on mouse clicks and update their checkmarks immediately through the shared choice-row component.
|
|
27
|
+
- Shared choice rows size themselves to their labels so longer English titles fit.
|
|
28
|
+
|
|
29
|
+
### Updates
|
|
30
|
+
|
|
31
|
+
- Read the committed `docs/release-notes-vX.Y.Z.md` from the version tag through raw.githubusercontent.com, then jsDelivr, with the GitHub Release API as a fallback. Release highlights continue to follow the exact UI-language section heading.
|
|
32
|
+
|
|
33
|
+
## [2.2.0] - 2026-10-08
|
|
34
|
+
|
|
35
|
+
First English-language release: the app and CLI are available in English and Simplified Chinese.
|
|
36
|
+
|
|
37
|
+
### Language
|
|
38
|
+
|
|
39
|
+
- The app is now available in English and Simplified Chinese. A new **Language** submenu offers **System Default**, **English** and **简体中文**; System Default follows macOS's preferred languages and falls back to English.
|
|
40
|
+
- `cc-pets` commands, hooks and CC Bridge messages follow the same choice through `~/.cc-pets/language`; `CC_PETS_LANGUAGE` overrides it per command.
|
|
41
|
+
- Added English default lines. An unedited `~/.cc-pets/speech.txt` switches with the language; lines without Chinese, Japanese or Korean text may now be up to 40 characters.
|
|
42
|
+
- The update dialog reads highlights only from the release notes section whose heading exactly matches the UI language; a missing section produces no highlights instead of falling back to other text.
|
|
43
|
+
|
|
44
|
+
### Interface
|
|
45
|
+
|
|
46
|
+
- Added English screenshots to the English README; the Simplified Chinese README retains Chinese screenshots. Each README displays its two screenshots side by side.
|
|
47
|
+
- Strengthened Today and Last 7 days headings, adjusted label spacing and trend captions, shortened quota window and risk labels, and removed redundant English trend descriptions.
|
|
48
|
+
- Update dialogs identify the installed version with “Current version”.
|
|
49
|
+
|
|
8
50
|
## [2.1.2] - 2026-10-04
|
|
9
51
|
|
|
10
52
|
Update prompts through the pet, `cc-pets doctor` and `cc-pets paths`, plus cleanup fixes.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,48 @@
|
|
|
4
4
|
|
|
5
5
|
本项目遵循语义化版本号。版本号以 `package.json` 为唯一来源。
|
|
6
6
|
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [2.2.1] - 2026-10-11
|
|
10
|
+
|
|
11
|
+
### 宠物大小与渲染
|
|
12
|
+
|
|
13
|
+
- 右键菜单新增「宠物大小」,提供实时调整的 50%~200% 滑动条和「恢复默认」按钮,点击后回到 100%。缩放保持脚底位置不变,并按新尺寸刷新动画帧缓存;大小设置在切换宠物和重启后保留。
|
|
14
|
+
- 宠物小于 100% 时,Hook 状态卡和消息气泡的文字、图标与点击区域同比例缩小;宠物达到或超过 100% 时,状态卡和气泡保持原尺寸。
|
|
15
|
+
- 修复 Retina 屏幕上精灵图模糊:解码时至少保留 2x 分辨率,并适配已连接屏幕的最高倍率。加载尺寸覆盖宠物最大缩放比例,无需降采样时保留原图。
|
|
16
|
+
|
|
17
|
+
### 桌宠台词
|
|
18
|
+
|
|
19
|
+
- 新增「碎碎念 → 台词来源 → 专属台词 / 默认台词」。专属台词按小节优先使用当前宠物词库,缺少的小节沿用通用台词;默认台词只使用可编辑的 `~/.cc-pets/speech.txt`。选择全局生效,立即应用,切换宠物和重启后仍保留;初始选择为专属台词。
|
|
20
|
+
- 修复切换界面语言后台词编辑器中英文混用:窗口标题、按钮、编辑范围标签和情境说明统一刷新,保留未保存的文本及当前情境选择。
|
|
21
|
+
|
|
22
|
+
### 菜单
|
|
23
|
+
|
|
24
|
+
- 「频率」和「台词来源」分别收进碎碎念子菜单,并移除碎碎念菜单内的分割线。
|
|
25
|
+
- 频率、台词来源、点击互动的次数阈值和连击间隔统一使用公共单选组件;鼠标点击后菜单保持展开,勾选立即更新。
|
|
26
|
+
- 公共单选行根据文案自动撑宽,确保较长的英文标题完整显示。
|
|
27
|
+
|
|
28
|
+
### 更新
|
|
29
|
+
|
|
30
|
+
- 更新说明改为读取版本 tag 中已提交的 `docs/release-notes-vX.Y.Z.md`,依次尝试 raw.githubusercontent.com、jsDelivr,最后回退到 GitHub Release API;更新要点继续按界面语言标题精确匹配。
|
|
31
|
+
|
|
32
|
+
## [2.2.0] - 2026-10-08
|
|
33
|
+
|
|
34
|
+
首个英文语言版本:App 与 CLI 支持英语和简体中文。
|
|
35
|
+
|
|
36
|
+
### 界面语言
|
|
37
|
+
|
|
38
|
+
- 界面支持英文和简体中文。右键菜单新增「语言」,可选「跟随系统」「English」「简体中文」;跟随系统时取 macOS 首选语言,都不匹配时用英文。
|
|
39
|
+
- `cc-pets` 命令、hooks 和 CC Bridge 消息通过 `~/.cc-pets/language` 跟随同一设置;`CC_PETS_LANGUAGE` 可按次覆盖。
|
|
40
|
+
- 新增英文默认台词。没改过的 `~/.cc-pets/speech.txt` 会随语言切换;不含中日韩文字的句子上限放宽到 40 个字符。
|
|
41
|
+
- 更新对话框只读取标题与界面语言完全匹配的 Release 段落;缺少对应段落时不展示要点,不会退回其他文字。
|
|
42
|
+
|
|
43
|
+
### 界面
|
|
44
|
+
|
|
45
|
+
- 英文 README 展示英文截图,中文 README 保留中文截图,各自两张图并排展示。
|
|
46
|
+
- Today 和 Last 7 days 标题加粗,标签间距与趋势图说明位置调整,窗口标题和风险提示精简,移除英文趋势区域的重复说明。
|
|
47
|
+
- 更新弹窗以「Current version」标识已安装版本。
|
|
48
|
+
|
|
7
49
|
## [2.1.2] - 2026-10-04
|
|
8
50
|
|
|
9
51
|
桌宠提示新版本,新增 `cc-pets doctor` 与 `cc-pets paths`,以及清理相关修复。
|
package/CONTRIBUTING.md
CHANGED
|
@@ -13,6 +13,74 @@ Thank you for contributing to CC Pets. Before submitting a change:
|
|
|
13
13
|
For a substantial feature, open a GitHub Issue before sending a Pull Request so the
|
|
14
14
|
scope can be agreed on first.
|
|
15
15
|
|
|
16
|
+
## Branch and release policy
|
|
17
|
+
|
|
18
|
+
Develop, test, and prepare preview releases on `publish`. Preview releases must be
|
|
19
|
+
marked as GitHub prereleases and use a prerelease version such as `2.2.1-rc.1`.
|
|
20
|
+
Install preview builds explicitly; the automatic updater accepts stable versions only.
|
|
21
|
+
`main` is reserved for stable releases, including the stable GitHub Release and tag.
|
|
22
|
+
Complete implementation, documentation, screenshots, and validation on `publish`
|
|
23
|
+
before submitting to `main`; repeat integration checks there before a stable release.
|
|
24
|
+
The latest stable GitHub release is **v2.2.1**, covering pet size, speech sources, and menu fixes.
|
|
25
|
+
See [release status](docs/release-status.md) for validation and handoff details.
|
|
26
|
+
|
|
27
|
+
## Localization
|
|
28
|
+
|
|
29
|
+
UI text is written in English in the source, and that text is the key into every
|
|
30
|
+
other language's table:
|
|
31
|
+
|
|
32
|
+
- Objective-C: wrap user-visible strings in `L(@"…")` (`Sources/CCPets/CCPetsL10n.h`).
|
|
33
|
+
Use `%1$@` / `%2$@` when a translation needs a different argument order.
|
|
34
|
+
- Node.js: use `t("…", { name })` from `scripts/i18n.mjs` with `{name}` placeholders.
|
|
35
|
+
- zsh: use `cc_pets_t "…" name="$value"` from `scripts/i18n.zsh`. The text must be a
|
|
36
|
+
literal; put variables in `{name}` placeholders, never directly in the text.
|
|
37
|
+
|
|
38
|
+
When you add or change an English string, update its key in every table.
|
|
39
|
+
`node scripts/check-l10n.mjs` (also part of `npm test`) reports missing, stale and
|
|
40
|
+
mismatched-placeholder entries for each language.
|
|
41
|
+
|
|
42
|
+
### Adding a language
|
|
43
|
+
|
|
44
|
+
Adding a language only adds files; no code changes are needed. For a language `xx`
|
|
45
|
+
(use the macOS identifier, such as `ja` or `zh-Hant`):
|
|
46
|
+
|
|
47
|
+
1. `Resources/xx.lproj/Localizable.strings`: copy the `zh-Hans` table and translate
|
|
48
|
+
each value. Set the two metadata entries: `"Language Name"` (the name shown in the
|
|
49
|
+
**Language** menu, written in that language) and `"Release Notes Section"` (the
|
|
50
|
+
heading of that language's section in GitHub release notes; separate alternatives
|
|
51
|
+
with `|`).
|
|
52
|
+
2. `Resources/xx.lproj/InfoPlist.strings`: translate `NSAppleEventsUsageDescription`.
|
|
53
|
+
3. `scripts/locales/xx.json`: translate the CLI table, copied from `zh-Hans.json`.
|
|
54
|
+
4. Optional: `Resources/phrases.default.xx.txt` with default pet lines, translated from
|
|
55
|
+
`phrases.default.en.txt`. Without it the pet falls back to the English lines.
|
|
56
|
+
|
|
57
|
+
`node scripts/check-l10n.mjs --missing xx` lists the keys still to translate. The app
|
|
58
|
+
discovers languages from the `.lproj` directories, `build.sh` writes
|
|
59
|
+
`CFBundleLocalizations` from them, and `package.json` already includes them by pattern.
|
|
60
|
+
|
|
61
|
+
### GitHub Release notes
|
|
62
|
+
|
|
63
|
+
Every GitHub Release body must keep each language in its own section. Use the exact
|
|
64
|
+
headings `## English` and `## 简体中文`, followed by that language's top-level bullet
|
|
65
|
+
highlights. The updater reads only the section whose heading exactly matches the
|
|
66
|
+
current UI language; it never falls back to the full body or another language. If the
|
|
67
|
+
matching section is missing, the update dialog shows no highlights and does not guess
|
|
68
|
+
from other text. Keep the English and Simplified Chinese bullets semantically aligned.
|
|
69
|
+
|
|
70
|
+
Write the body in `docs/release-notes-vX.Y.Z.md`, commit it before creating the tag,
|
|
71
|
+
and publish with `gh release create vX.Y.Z --notes-file docs/release-notes-vX.Y.Z.md`.
|
|
72
|
+
The updater reads this file from the tag (raw.githubusercontent.com, then jsDelivr)
|
|
73
|
+
and only falls back to the rate-limited GitHub Release API, so editing the Release on
|
|
74
|
+
GitHub afterwards does not change the in-app highlights.
|
|
75
|
+
|
|
76
|
+
For every release, update `package.json`, both READMEs, both changelogs, the cover
|
|
77
|
+
version, and `docs/release-status.md` together. Move shipped changes from
|
|
78
|
+
`Unreleased` into the dated version section and preserve historical entries and
|
|
79
|
+
release notes. Keep exactly three top-level highlights per language, each at most
|
|
80
|
+
50 characters; use prose for additional detail and link to the matching tagged
|
|
81
|
+
changelog. Verify the final body with the app's release-note parser before tagging,
|
|
82
|
+
and publish that committed file without regenerating the body on GitHub.
|
|
83
|
+
|
|
16
84
|
## Asset requirements
|
|
17
85
|
|
|
18
86
|
- Use PNG or WebP with a transparent background.
|
package/CONTRIBUTING.zh-CN.md
CHANGED
|
@@ -12,6 +12,62 @@
|
|
|
12
12
|
|
|
13
13
|
建议先开一个 GitHub Issue 描述较大的功能改动,达成一致后再提交 Pull Request。
|
|
14
14
|
|
|
15
|
+
## 分支与发布规则
|
|
16
|
+
|
|
17
|
+
在 `publish` 完成开发、修改、测试和测试版本准备。测试版本必须在 GitHub 标记为
|
|
18
|
+
prerelease,并使用如 `2.2.1-rc.1` 的预发布版本号。`main` 仅负责正式版本,包括正式
|
|
19
|
+
GitHub Release 和 tag。提交到 `main` 前,代码、文档、截图与验证必须全部完成;
|
|
20
|
+
在 `main` 完成集成验证后才能发布正式版本。
|
|
21
|
+
测试版本需显式安装,自动更新器只接受正式版本号。
|
|
22
|
+
当前 GitHub 正式版本为 **v2.2.1**,包含宠物大小、台词来源与菜单修复。
|
|
23
|
+
验证和交接状态见[发布状态](docs/release-status.md)。
|
|
24
|
+
|
|
25
|
+
## 多语言
|
|
26
|
+
|
|
27
|
+
界面文案在源码里写英文原文,这段原文就是其他各语言表的 key:
|
|
28
|
+
|
|
29
|
+
- Objective-C:用户可见的字符串包在 `L(@"…")` 里(见 `Sources/CCPets/CCPetsL10n.h`)。
|
|
30
|
+
译文需要调换参数顺序时用 `%1$@` / `%2$@`。
|
|
31
|
+
- Node.js:用 `scripts/i18n.mjs` 的 `t("…", { name })`,参数写成 `{name}` 占位。
|
|
32
|
+
- zsh:用 `scripts/i18n.zsh` 的 `cc_pets_t "…" name="$value"`。原文必须是字面量,
|
|
33
|
+
变量一律写成 `{name}` 占位,不能直接拼进原文。
|
|
34
|
+
|
|
35
|
+
新增或修改英文原文时,要同步更新每张表里的 key。`node scripts/check-l10n.mjs`(`npm test`
|
|
36
|
+
也会跑)会逐个语言报出缺翻译、多余条目和占位符不一致。
|
|
37
|
+
|
|
38
|
+
### 新增一种语言
|
|
39
|
+
|
|
40
|
+
新增语言只需要加文件,不用改代码。以语言 `xx` 为例(用 macOS 的语言标识,如 `ja`、`zh-Hant`):
|
|
41
|
+
|
|
42
|
+
1. `Resources/xx.lproj/Localizable.strings`:复制 `zh-Hans` 那张表,逐条翻译值。
|
|
43
|
+
填好两条元信息:`"Language Name"`(「语言」菜单里显示的名字,用该语言自己的写法)和
|
|
44
|
+
`"Release Notes Section"`(GitHub Release 说明里该语言段落的标题,多种写法用 `|` 隔开)。
|
|
45
|
+
2. `Resources/xx.lproj/InfoPlist.strings`:翻译 `NSAppleEventsUsageDescription`。
|
|
46
|
+
3. `scripts/locales/xx.json`:复制 `zh-Hans.json`,翻译 CLI 文案。
|
|
47
|
+
4. 可选:`Resources/phrases.default.xx.txt`,从 `phrases.default.en.txt` 翻译默认台词;
|
|
48
|
+
没有的话桌宠退回英文台词。
|
|
49
|
+
|
|
50
|
+
`node scripts/check-l10n.mjs --missing xx` 会列出还没翻译的 key。App 按 `.lproj` 目录发现语言,
|
|
51
|
+
`build.sh` 据此生成 `CFBundleLocalizations`,`package.json` 已按通配符包含这些文件。
|
|
52
|
+
|
|
53
|
+
### GitHub Release 说明
|
|
54
|
+
|
|
55
|
+
每个 GitHub Release 的正文必须按语言分段。使用完全匹配的标题 `## English` 和
|
|
56
|
+
`## 简体中文`,标题下面写对应语言的顶层列表要点。更新器只读取与当前界面语言标题
|
|
57
|
+
完全匹配的段落,不会退回全文,也不会读取其他语言;缺少匹配段落时,更新对话框不展示
|
|
58
|
+
要点,不会从其他文字中猜测。英文和简体中文的要点应保持语义对应。
|
|
59
|
+
|
|
60
|
+
正文写在 `docs/release-notes-vX.Y.Z.md`,在打 tag 之前提交,再用
|
|
61
|
+
`gh release create vX.Y.Z --notes-file docs/release-notes-vX.Y.Z.md` 发布。更新器从 tag
|
|
62
|
+
里读取这个文件(先 raw.githubusercontent.com,再 jsDelivr),最后才退到有限流的
|
|
63
|
+
GitHub Release API,所以发布后在 GitHub 网页上修改 Release 不会改变 App 内的要点。
|
|
64
|
+
|
|
65
|
+
每次发版须同步更新 `package.json`、双语 README、双语 CHANGELOG、封面版本文字和
|
|
66
|
+
`docs/release-status.md`。将已交付改动从 `Unreleased` 归入带日期的版本小节,保留历史
|
|
67
|
+
版本记录及 Release Note。每种语言严格保留 3 条顶层要点,每条不超过 50 字符;补充
|
|
68
|
+
细节使用段落,并链接到对应 tag 的 CHANGELOG。打 tag 前用 App 的真实解析函数校验
|
|
69
|
+
最终正文,发布时直接使用已提交文件,不在 GitHub 重新生成正文。
|
|
70
|
+
|
|
15
71
|
## 素材规范
|
|
16
72
|
|
|
17
73
|
- 支持 PNG 或 WebP,背景必须透明。
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="docs/images/cover.png" alt="CC Pets v2.
|
|
2
|
+
<img src="docs/images/cover.png" alt="CC Pets v2.2.1: adjustable pet size and selectable speech sources">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# CC Pets
|
|
@@ -11,41 +11,32 @@ desktop app. Launch CC Pets directly, or let it appear automatically when Codex
|
|
|
11
11
|
or Claude Code CLI starts. It reads five-hour and weekly quota data from the official
|
|
12
12
|
Codex App Server interface and Claude Code's official status line input.
|
|
13
13
|
|
|
14
|
-
> The
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
The output shows your home directory as `~`, so you can paste it into an issue.
|
|
28
|
-
- **`cc-pets paths`** — lists where settings, pet assets, phrases, caches and runtime
|
|
29
|
-
state live, how large each is, and what `clean` and `uninstall --purge` remove
|
|
30
|
-
(`--json` for machine-readable output).
|
|
31
|
-
- **Fixes** — `cc-pets clean` also clears the pet store manifest cache, and CC Bridge now
|
|
32
|
-
tells you when the installed Codex lacks `codex queue`, in which case messages to Codex
|
|
33
|
-
wait in its inbox.
|
|
34
|
-
|
|
35
|
-
See the [changelog](./CHANGELOG.md) for the full list.
|
|
14
|
+
> The app and CLI are available in English and Simplified Chinese (see [Language](#language)).
|
|
15
|
+
|
|
16
|
+
## What's new in v2.2.1
|
|
17
|
+
|
|
18
|
+
- **Adjustable pet size** — use **Pet Size** in the right-click menu for live 50%–200%
|
|
19
|
+
scaling. The setting persists, smaller pets get proportionally smaller status cards
|
|
20
|
+
and bubbles, and sprites stay sharper on Retina displays.
|
|
21
|
+
- **Selectable speech sources** — choose **Chatter → Line Source → Pet-specific Lines**
|
|
22
|
+
or **Default Lines**. The choice applies immediately and survives pet changes and restarts.
|
|
23
|
+
- **Menu and editor fixes** — choice menus stay open and update their checkmarks,
|
|
24
|
+
longer English labels fit, and the lines editor refreshes its language without losing edits.
|
|
25
|
+
|
|
26
|
+
See the [changelog](./CHANGELOG.md) and [release notes](./docs/release-notes-v2.2.1.md) for the full list.
|
|
36
27
|
|
|
37
28
|
## Screenshots
|
|
38
29
|
|
|
39
|
-
|
|
40
|
-
<img src="docs/images/liquid-glass-panel.png" width="80%" alt="Quota panel, speech bubble and pet in the Liquid Glass theme, current Simplified Chinese UI">
|
|
41
|
-
</p>
|
|
30
|
+
English — v2.2.0 quota panel and Language menu:
|
|
42
31
|
|
|
43
32
|
<p align="center">
|
|
44
|
-
<img src="docs/images/liquid-glass-
|
|
33
|
+
<img src="docs/images/liquid-glass-panel.en.png" width="45%" alt="English Agent Usage panel in v2.2.0 with quota, tokens, trends, and system status">
|
|
34
|
+
<img src="docs/images/liquid-glass-menu.en.png" width="45%" alt="English right-click menu with English selected in the Language submenu">
|
|
45
35
|
</p>
|
|
46
36
|
|
|
47
37
|
## Features
|
|
48
38
|
|
|
39
|
+
- Supports English and Simplified Chinese in the app and CLI, with live UI language switching.
|
|
49
40
|
- Offers Classic and native Liquid Glass panel themes on macOS 26 and later.
|
|
50
41
|
- Starts with Codex CLI or Claude Code CLI and closes after the last managed CLI exits.
|
|
51
42
|
- Shares one pet across multiple simultaneous Codex and Claude sessions.
|
|
@@ -61,6 +52,9 @@ See the [changelog](./CHANGELOG.md) for the full list.
|
|
|
61
52
|
- Supports optional local quota history and macOS notifications.
|
|
62
53
|
- Supports third-party CLI agents through a provider event protocol.
|
|
63
54
|
- Includes editable global and per-pet speech.
|
|
55
|
+
- Offers **Chatter → Line Source → Pet-specific Lines / Default Lines**. Pet-specific lines
|
|
56
|
+
override shared sections; default lines use only the editable shared speech file. The
|
|
57
|
+
selection persists across pet changes and restarts, with pet-specific lines selected initially.
|
|
64
58
|
- Includes one original pet and can download compatible assets from PetDex.
|
|
65
59
|
- Uses native AppKit with no Electron runtime.
|
|
66
60
|
|
|
@@ -179,7 +173,10 @@ claude-with-pet # Start the pet and enter Claude Code CLI.
|
|
|
179
173
|
|
|
180
174
|
`package.json` is the single version source. Use `npm version patch`, `minor`, or
|
|
181
175
|
`major` for a future release; npm runs the test suite and the build writes the
|
|
182
|
-
version into the generated app's `Info.plist`.
|
|
176
|
+
version into the generated app's `Info.plist`. Every release also updates both
|
|
177
|
+
READMEs, both changelogs, the cover version, and [release status](./docs/release-status.md).
|
|
178
|
+
Commit the bilingual `docs/release-notes-vX.Y.Z.md` before tagging; follow the
|
|
179
|
+
[Release notes rules](./CONTRIBUTING.md#github-release-notes).
|
|
183
180
|
|
|
184
181
|
## Agent integration
|
|
185
182
|
|
|
@@ -212,7 +209,13 @@ prompts, command text, file contents, or model output.
|
|
|
212
209
|
| Hover on either body side | Directional interaction animation |
|
|
213
210
|
| Click | Playful response animation |
|
|
214
211
|
| Drag left or right | Directional drag animation |
|
|
215
|
-
| Right-click | Pet, notification, Help (update check and About), and exit menu |
|
|
212
|
+
| Right-click | Pet, size, notification, Help (update check and About), and exit menu |
|
|
213
|
+
|
|
214
|
+
**Pet Size** in the right-click menu offers a 50%–200% slider with a live percentage
|
|
215
|
+
and **Reset Size** to return to 100%. The pet scales around its feet, and its size
|
|
216
|
+
persists across pet changes and restarts.
|
|
217
|
+
Hook status cards and speech bubbles shrink with the pet below 100%, including
|
|
218
|
+
their text, icons, and click targets. At 100% and above they keep their original size.
|
|
216
219
|
|
|
217
220
|
The **Panel theme** submenu offers **Classic** and **Liquid Glass**. Classic is the
|
|
218
221
|
default. Changes apply immediately to the quota panel, status card, and speech
|
|
@@ -223,6 +226,18 @@ panel, status card, and speech bubble: Clear (0%), Light (15%), Standard (25%,
|
|
|
223
226
|
default), or Legible (45%). Lower levels
|
|
224
227
|
look more transparent; higher levels keep text readable over light backgrounds.
|
|
225
228
|
|
|
229
|
+
### Language
|
|
230
|
+
|
|
231
|
+
The **Language** submenu offers **System Default** plus every bundled language,
|
|
232
|
+
currently **English** and **简体中文**. System Default follows the first supported
|
|
233
|
+
entry in macOS's preferred languages and falls back to English. Menus and panels switch right away; system
|
|
234
|
+
buttons in dialogs follow after the next launch. The choice is written to
|
|
235
|
+
`~/.cc-pets/language`, so `cc-pets` commands, hooks, and CC Bridge messages use the
|
|
236
|
+
same language; set `CC_PETS_LANGUAGE=en` or `zh-Hans` to override it for one
|
|
237
|
+
command. If you never edited `~/.cc-pets/speech.txt`, it switches to the default
|
|
238
|
+
lines of the new language; edited lines are left alone. To contribute another
|
|
239
|
+
language, see [Adding a language](./CONTRIBUTING.md#adding-a-language).
|
|
240
|
+
|
|
226
241
|
The pet switcher scans only built-in assets and `~/.cc-pets/pets/`. It does not
|
|
227
242
|
scan `~/.petdex/pets/` or `~/.codex/pets/`. To use assets installed by Codex,
|
|
228
243
|
enable **Import Codex pets** in the app's right-click menu; CC Pets copies valid
|
|
@@ -276,7 +291,8 @@ days, and records at most once every 15 minutes.
|
|
|
276
291
|
The pet's speech comes from `~/.cc-pets/speech.txt`. Open **Speech → Edit lines…**
|
|
277
292
|
in the right-click menu to edit, validate, preview, or restore it. Lines are grouped
|
|
278
293
|
under stable situation tags such as `[idle]`, `[done]`, and `[state_thinking]`.
|
|
279
|
-
Each
|
|
294
|
+
Each line is limited to 30 characters if it contains Chinese, Japanese, or Korean
|
|
295
|
+
text, and to 40 characters otherwise.
|
|
280
296
|
|
|
281
297
|
Supported live placeholders are `{quota5h}`, `{resetTime}`, `{toolName}`,
|
|
282
298
|
`{sessionMin}`, `{failCount}`, and `{hour}`. A line is skipped if one of its values
|
|
@@ -353,7 +369,7 @@ external assets.
|
|
|
353
369
|
- Local quota history is disabled by default and retains seven days when enabled.
|
|
354
370
|
- Status cards and notifications show only provider, state, and redacted tool category.
|
|
355
371
|
- CC Pets contains no telemetry and uploads no conversations, quotas, credentials, or usage statistics.
|
|
356
|
-
- On launch, and when a CLI reopens the running pet, CC Pets asks the npm registry for the latest version (at most once every 10 minutes per run); only when a newer version exists does it read that version's release notes from the GitHub API. These requests carry no account or usage data.
|
|
372
|
+
- On launch, and when a CLI reopens the running pet, CC Pets asks the npm registry for the latest version (at most once every 10 minutes per run); only when a newer version exists does it read that version's committed release notes from the tag through raw.githubusercontent.com, then jsDelivr, with the GitHub Release API as a fallback. These requests carry no account or usage data.
|
|
357
373
|
- Exiting the pet or running `cc-pets uninstall` leaves no background daemon running.
|
|
358
374
|
- [CC Bridge](./CC_BRIDGE.md) is off by default. When enabled, messages between sessions are stored
|
|
359
375
|
in the current user's temporary directory (owner-only, 24-hour expiry); it is the only feature
|
package/README.zh-CN.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="docs/images/cover.png" alt="CC Pets v2.
|
|
2
|
+
<img src="docs/images/cover.png" alt="CC Pets v2.2.1:宠物大小调整与台词来源选择">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# CC Pets
|
|
@@ -9,32 +9,29 @@
|
|
|
9
9
|
一个不依赖 Codex/Claude 桌面端的 macOS 原生桌宠。直接启动桌面端,或启动 Codex CLI / Claude Code CLI 时自动出现,
|
|
10
10
|
并通过 Codex App Server 官方接口与 Claude Code 官方 status line 数据读取 5 小时额度、周额度和周重置时间。
|
|
11
11
|
|
|
12
|
-
## v2.1
|
|
12
|
+
## v2.2.1 新功能
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
与 `uninstall --purge` 各自删除哪些(`--json` 输出机器可读格式)。
|
|
21
|
-
- **修复**:`cc-pets clean` 会一并清理素材清单缓存;当前 Codex 不支持 `codex queue` 时,CC Bridge
|
|
22
|
-
会明确提示,发给 Codex 的消息先进信箱。
|
|
14
|
+
- **宠物大小调整**:右键「宠物大小」可实时缩放至 50%~200%,设置自动保存;
|
|
15
|
+
小尺寸宠物的状态卡与气泡同比例缩小,并修复 Retina 屏幕上的精灵图模糊。
|
|
16
|
+
- **台词来源选择**:「碎碎念 → 台词来源」可选择「专属台词」或「默认台词」,
|
|
17
|
+
立即生效,切换宠物和重启后仍保留。
|
|
18
|
+
- **菜单与编辑器修复**:单选后菜单保持展开、勾选即时更新,长英文标题完整显示;
|
|
19
|
+
台词编辑器切换语言时统一刷新文案,并保留未保存的编辑。
|
|
23
20
|
|
|
24
|
-
完整改动见 [更新记录](./CHANGELOG.zh-CN.md)。
|
|
21
|
+
完整改动见 [更新记录](./CHANGELOG.zh-CN.md) 和 [Release Note](./docs/release-notes-v2.2.1.md)。
|
|
25
22
|
|
|
26
23
|
## 界面预览
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
<img src="docs/images/liquid-glass-panel.png" width="80%" alt="Liquid Glass 主题下的额度面板、说话气泡与桌宠">
|
|
30
|
-
</p>
|
|
25
|
+
简体中文:额度面板与右键菜单。
|
|
31
26
|
|
|
32
27
|
<p align="center">
|
|
33
|
-
<img src="docs/images/liquid-glass-
|
|
28
|
+
<img src="docs/images/liquid-glass-panel.png" width="45%" alt="Liquid Glass 主题下的中文额度面板">
|
|
29
|
+
<img src="docs/images/liquid-glass-menu.png" width="45%" alt="中文右键菜单与面板主题子菜单">
|
|
34
30
|
</p>
|
|
35
31
|
|
|
36
32
|
## 功能
|
|
37
33
|
|
|
34
|
+
- App 与 CLI 支持英语和简体中文,界面语言可即时切换
|
|
38
35
|
- macOS 26 及以上可在经典与原生 Liquid Glass 两种面板主题之间切换
|
|
39
36
|
- 随 Codex CLI 或 Claude Code CLI 自动启动,无需打开对应桌面版
|
|
40
37
|
- 多个 Codex/Claude CLI 共用一个桌宠,最后一个 CLI 退出后桌宠自动关闭
|
|
@@ -109,12 +106,26 @@ JetBrains IDE、Warp、WezTerm、Ghostty 等在不安装扩展的模式下仅激
|
|
|
109
106
|
| 鼠标移开或拖动结束 | 恢复默认待机动画 |
|
|
110
107
|
| 右键桌宠 | 切换桌宠、设置历史/通知、在「帮助」中检查更新或查看关于、退出 |
|
|
111
108
|
|
|
109
|
+
右键菜单「宠物大小」提供 50%~200% 的滑动条,拖动时实时缩放并显示百分比,
|
|
110
|
+
点击「恢复默认」回到 100%。大小会自动保存,切换桌宠或重启后保留;缩放时脚底位置固定。
|
|
111
|
+
Hook 状态卡和消息气泡在宠物小于 100% 时同比例缩小,文字、图标和点击区域一起缩放;
|
|
112
|
+
宠物放大到 100% 以上时,状态卡与气泡保持原尺寸。
|
|
113
|
+
|
|
112
114
|
右键菜单「面板主题」提供「经典」和「Liquid Glass」,默认使用经典样式。
|
|
113
115
|
选择后立即应用于额度面板、状态条和说话气泡,并在重启后保留。Liquid Glass 使用系统原生玻璃,
|
|
114
116
|
仅在 macOS 26 及以上可选;构建原生玻璃支持需要 macOS 26 或更新的 SDK。同一子菜单里的「玻璃压暗」
|
|
115
117
|
可在通透(0%)、轻度(15%)、标准(25%,默认)、清晰(45%)之间切换,作用于额度面板、状态卡和
|
|
116
118
|
说话气泡:档位越低越通透,档位越高在浅色背景上越容易看清。
|
|
117
119
|
|
|
120
|
+
### 界面语言
|
|
121
|
+
|
|
122
|
+
右键菜单「语言」提供「跟随系统」和所有已打包的语言,目前是「English」「简体中文」。
|
|
123
|
+
跟随系统时,取 macOS 首选语言里第一个支持的语言,都不支持就用英文。菜单和面板立即切换;对话框里的系统按钮在下次启动后跟上。
|
|
124
|
+
选择会写入 `~/.cc-pets/language`,`cc-pets` 命令、hooks 和 CC Bridge 消息因此使用同一种语言;
|
|
125
|
+
单次命令可以用 `CC_PETS_LANGUAGE=en` 或 `zh-Hans` 覆盖。如果从没改过 `~/.cc-pets/speech.txt`,
|
|
126
|
+
它会换成新语言的默认台词;改过的台词保持不动。想贡献其他语言的翻译,
|
|
127
|
+
见 [新增一种语言](./CONTRIBUTING.zh-CN.md#新增一种语言)。
|
|
128
|
+
|
|
118
129
|
右键菜单中的“切换桌宠”只扫描 `~/.cc-pets/pets/`(见 [素材管理](#素材管理))和包内素材,
|
|
119
130
|
**不会**去读 `~/.petdex/pets/` 和 `~/.codex/pets/`——那两个目录由 PetDex CLI 和 Codex 写入,
|
|
120
131
|
混在一起就找不到自己装的宠物了。要用 Codex 那边的素材,打开右键菜单里的“导入 Codex
|
|
@@ -163,7 +174,12 @@ Provider、脱敏状态和通用说明,不提供消息输入,也不会显示
|
|
|
163
174
|
## 碎碎念
|
|
164
175
|
|
|
165
176
|
桌宠会以自己的口吻讲话:Agent 干活时讲的话直接写在状态卡副行上,闲着的时候单独冒气泡。
|
|
166
|
-
|
|
177
|
+
右键菜单「碎碎念」里可以整体开关、调频率、选择台词来源、改台词。
|
|
178
|
+
|
|
179
|
+
「台词来源」里可单选 **专属台词** 或 **默认台词**:专属台词优先使用当前宠物的
|
|
180
|
+
词库,缺少的小节沿用通用词库;默认台词只使用 `~/.cc-pets/speech.txt` 中的通用台词,
|
|
181
|
+
包括你对这份词库的修改。初始选择为专属台词,保持原有行为;选择全局生效,切换宠物和
|
|
182
|
+
重启后仍保留,不会覆盖任何台词文件。
|
|
167
183
|
|
|
168
184
|
### 频率
|
|
169
185
|
|
|
@@ -197,7 +213,7 @@ Agent **正在干活**时(思考、调用工具、等待审批、子 Agent 工
|
|
|
197
213
|
```
|
|
198
214
|
|
|
199
215
|
- `[情境]` 起一节,下面一行一句,直接改字、加行、删行
|
|
200
|
-
-
|
|
216
|
+
- 含中日韩文字的句子 30 字以内,纯英文等拉丁文字 40 个字符以内,超了那一行会被丢掉
|
|
201
217
|
- 写错只丢那一行,不会让整个文件失效
|
|
202
218
|
|
|
203
219
|
可以插入这些实时数据(连花括号一起写):`{quota5h}` `{resetTime}` `{toolName}`
|
|
@@ -453,7 +469,10 @@ claude-with-pet
|
|
|
453
469
|
|
|
454
470
|
项目版本以 `package.json` 为唯一来源。发布新版本时执行 `npm version patch`、
|
|
455
471
|
`npm version minor` 或 `npm version major`;npm 会自动运行完整测试,构建过程会将新版本写入
|
|
456
|
-
生成的 App `Info.plist`,无需手动修改 `Resources/Info.plist
|
|
472
|
+
生成的 App `Info.plist`,无需手动修改 `Resources/Info.plist`。每次发版同时更新双语 README、
|
|
473
|
+
双语 CHANGELOG、封面版本文字与[发布状态](./docs/release-status.md)。双语正文
|
|
474
|
+
`docs/release-notes-vX.Y.Z.md` 须先提交再打 tag,遵循
|
|
475
|
+
[Release Note 规则](./CONTRIBUTING.zh-CN.md#github-release-说明)。
|
|
457
476
|
|
|
458
477
|
## 用量数据
|
|
459
478
|
|
|
@@ -639,7 +658,7 @@ PetDex 官方 CLI(`npx petdex install <slug>`)会把素材放在 `~/.petdex/
|
|
|
639
658
|
- 额度历史默认关闭;启用后只在本机保留最近 7 天的剩余比例快照。
|
|
640
659
|
- 状态气泡和通知只显示 Provider、状态及脱敏工具类别,不显示会话正文。
|
|
641
660
|
- 项目不上传会话内容、额度、凭据或使用统计,也不包含遥测服务。
|
|
642
|
-
- 桌宠启动时及 CLI 再次唤起桌宠时会向 npm Registry 查询最新版本号(同一次运行内最多每 10
|
|
661
|
+
- 桌宠启动时及 CLI 再次唤起桌宠时会向 npm Registry 查询最新版本号(同一次运行内最多每 10 分钟一次);仅在有新版本时再读取该版本 tag 中已提交的 Release Note,依次尝试 raw.githubusercontent.com、jsDelivr,最后回退到 GitHub Release API。请求不携带任何账号或使用数据。
|
|
643
662
|
- 右键“退出桌宠”或执行 `cc-pets uninstall` 后,不会继续运行后台守护进程。
|
|
644
663
|
- [CC Bridge](./CC_BRIDGE.zh-CN.md) 默认关闭;开启后,会话之间的消息正文会保存在当前用户的临时目录
|
|
645
664
|
(仅本人可读,24 小时过期),这是本项目唯一会保存正文的功能。
|
package/Resources/Info.plist
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
3
|
<plist version="1.0">
|
|
4
4
|
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
5
7
|
<key>CFBundleDisplayName</key>
|
|
6
8
|
<string>CC Pets</string>
|
|
7
9
|
<key>CFBundleExecutable</key>
|
|
@@ -23,6 +25,6 @@
|
|
|
23
25
|
<key>NSHighResolutionCapable</key>
|
|
24
26
|
<true/>
|
|
25
27
|
<key>NSAppleEventsUsageDescription</key>
|
|
26
|
-
<string
|
|
28
|
+
<string>Used to switch back to the matching terminal tab when you click the Agent status card.</string>
|
|
27
29
|
</dict>
|
|
28
30
|
</plist>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"NSAppleEventsUsageDescription" = "Used to switch back to the matching terminal tab when you click the Agent status card.";
|