cc-pets 1.3.3 → 1.4.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.
@@ -59,6 +59,12 @@ int main(int argc, const char *argv[]) {
59
59
  if (argc > 2 && strcmp(argv[1], "--render-switches") == 0) {
60
60
  return RenderMenuSwitches([NSString stringWithUTF8String:argv[2]]);
61
61
  }
62
+ // --render-pet <out.png> <sheet.webp> [rowCount]:逐格渲染 PetView 的等价校验基准。
63
+ if (argc > 3 && strcmp(argv[1], "--render-pet") == 0) {
64
+ NSInteger rowCount = argc > 4 ? atoi(argv[4]) : 9;
65
+ return RenderPetSheet([NSString stringWithUTF8String:argv[2]],
66
+ [NSString stringWithUTF8String:argv[3]], rowCount);
67
+ }
62
68
  if (argc > 1 && strcmp(argv[1], "--status") == 0) {
63
69
  NSDictionary *usage = LatestUsage();
64
70
  if (!usage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-pets",
3
- "version": "1.3.3",
3
+ "version": "1.4.1",
4
4
  "description": "A native macOS desktop pet for Codex CLI and Claude Code",
5
5
  "author": "wangxinyusqn",
6
6
  "license": "MIT",
package/scripts/build.sh CHANGED
@@ -51,6 +51,11 @@ if (( ${#SPRITES[@]} > 0 )); then
51
51
  cp "${SPRITES[@]}" "${BUILD_DIR}/"
52
52
  cp "${SPRITES[@]}" "${APP_RESOURCES_DIR}/"
53
53
  fi
54
+ # 出厂台词。代码里不再留内置词库,这个文件就是默认台词的唯一来源,
55
+ # 首次启动时被拷到 ~/.cc-pets/phrases.txt。
56
+ # 裸二进制旁边也放一份:直接跑 .build/release/cc-pets 时没有 app bundle。
57
+ cp "${PROJECT_DIR}/Resources/phrases.default.txt" "${APP_RESOURCES_DIR}/phrases.default.txt"
58
+ cp "${PROJECT_DIR}/Resources/phrases.default.txt" "${BUILD_DIR}/phrases.default.txt"
54
59
  cp "${BUILD_DIR}/cc-pets" "${APP_MACOS_DIR}/cc-pets"
55
60
  cp "${PROJECT_DIR}/Resources/Info.plist" "${APP_DIR}/Contents/Info.plist"
56
61
  cp "${PROJECT_DIR}/Resources/AppIcon.icns" "${APP_RESOURCES_DIR}/AppIcon.icns"