@jspg-ai/coding-bb 0.0.3-beta.17 → 0.0.3-beta.18

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.
@@ -1006,12 +1006,15 @@ async function init(targetDir, options = {}) {
1006
1006
  // 选择优先级:调用方预设(cbb setup)> .last-tools(非交互沿用)> 交互选择;无记录才回退全选
1007
1007
  const isNonInteractive = yes || !process.stdin.isTTY;
1008
1008
  let selectedAdapters;
1009
+ let fromRecord = false; // 选择来自预设或 .last-tools 记录(需落盘归一化后的新工具名)
1009
1010
  if (presetAdapters && presetAdapters.length > 0) {
1010
1011
  selectedAdapters = presetAdapters;
1012
+ fromRecord = true;
1011
1013
  } else if (isNonInteractive) {
1012
1014
  const lastTools = readLastTools();
1013
1015
  const reused = lastTools ? adapters.filter(a => lastTools.has(a.name)) : [];
1014
1016
  selectedAdapters = reused.length > 0 ? reused : adapters;
1017
+ fromRecord = reused.length > 0;
1015
1018
  if (yes && process.stdin.isTTY) {
1016
1019
  log(reused.length > 0
1017
1020
  ? `--yes 非交互模式,沿用上次工具选择:${reused.map(a => a.displayName).join('、')}`
@@ -1020,8 +1023,9 @@ async function init(targetDir, options = {}) {
1020
1023
  } else {
1021
1024
  selectedAdapters = await selectTools(isUpgrade);
1022
1025
  }
1023
- // 业务空间根记录本次选择,供 cbb update 等非交互场景沿用
1024
- if (isWorkspaceRoot && presetAdapters && presetAdapters.length > 0) {
1026
+ // 业务空间根记录本次选择,供 cbb update 等非交互场景沿用;
1027
+ // 沿用旧记录时同样落盘,使历史工具名(codebuddy → workbuddy)归一化自愈
1028
+ if (isWorkspaceRoot && fromRecord) {
1025
1029
  saveLastTools(selectedAdapters);
1026
1030
  }
1027
1031
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jspg-ai/coding-bb",
3
- "version": "0.0.3-beta.17",
3
+ "version": "0.0.3-beta.18",
4
4
  "description": "整合业界热门且高价值的工具、框架与技能,为 AI CODING AGENT 提供统一的行为准则与工作流,辅助开发者将需求高效落地为符合规范的代码",
5
5
  "main": "cbb/lib/install/init.js",
6
6
  "bin": {