codepet 1.0.7 → 1.0.8

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.
Files changed (2) hide show
  1. package/bin/codepet.js +5 -0
  2. package/package.json +1 -1
package/bin/codepet.js CHANGED
@@ -487,6 +487,11 @@ function doPopup() {
487
487
  const script = path.join(__dirname, '..', 'scripts', 'polaroid_image.py');
488
488
  try {
489
489
  execSync(`${PYTHON} "${script}" ${pet.character} ${scene}`, { encoding: 'utf-8', stdio: 'inherit' });
490
+ const photoPath = path.join(os.homedir(), '.codepet', 'photo.png');
491
+ if (fs.existsSync(photoPath)) {
492
+ const openCmd = process.platform === 'win32' ? 'start ""' : process.platform === 'darwin' ? 'open' : 'xdg-open';
493
+ execSync(`${openCmd} "${photoPath}"`, { stdio: 'ignore', shell: true });
494
+ }
490
495
  } catch {}
491
496
  }
492
497
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codepet",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "在编程软件里养电子宠物 — 支持 Claude Code / Codex / Cursor / VS Code 等 10+ 平台",
5
5
  "main": "core/index.js",
6
6
  "bin": {