airail 0.1.9 → 0.1.10

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/dist/cli/add.js +11 -2
  2. package/package.json +1 -1
package/dist/cli/add.js CHANGED
@@ -106,8 +106,17 @@ async function cmdAdd(arg) {
106
106
  });
107
107
  }
108
108
  if (config.pack) {
109
- console.log((0, colors_1.warn)(`当前已安装 pack: ${config.pack}`));
110
- console.log((0, colors_1.warn)('一个项目只能安装一个 pack,新 pack 将覆盖现有内容。'));
109
+ const [selectedName] = packNameWithVersion.split('@');
110
+ if (config.pack === selectedName) {
111
+ const yes = await (0, prompts_1.confirm)({ message: `已安装 ${config.pack},是否重新安装以更新?`, default: true });
112
+ if (!yes)
113
+ return;
114
+ }
115
+ else {
116
+ const yes = await (0, prompts_1.confirm)({ message: `当前已安装 ${config.pack},替换为 ${selectedName}?`, default: true });
117
+ if (!yes)
118
+ return;
119
+ }
111
120
  }
112
121
  await installPackFromConfigCenter(packNameWithVersion, claudeDir, config, packs);
113
122
  (0, utils_1.writeAirailJson)(claudeDir, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "airail",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "AI coding assistant framework - enforce coding standards via Claude hooks & skills",
5
5
  "bin": {
6
6
  "airail": "./bin/airail.js"