yg-team-cli 2.4.5 → 2.4.6
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/dist/cli.js +7 -24
- package/dist/cli.js.map +1 -1
- package/dist/index.js +7 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3550,41 +3550,24 @@ async function updateAiMemory(featureName, featureSlug) {
|
|
|
3550
3550
|
let content = await FileUtils.read(aiMemoryFile);
|
|
3551
3551
|
const newRow = `| ${featureName} | ${featureSlug}.md | \u25CB \u672A\u5F00\u59CB | 0/0 | - | |`;
|
|
3552
3552
|
if (!content.includes("## \u529F\u80FD\u6E05\u5355")) {
|
|
3553
|
-
|
|
3554
|
-
if (lastHeaderMatch) {
|
|
3555
|
-
const featureList = `
|
|
3556
|
-
|
|
3553
|
+
content += `
|
|
3557
3554
|
## \u529F\u80FD\u6E05\u5355 (Feature Inventory)
|
|
3558
3555
|
|
|
3559
3556
|
| \u529F\u80FD | Spec \u6587\u4EF6 | \u72B6\u6001 | \u8FDB\u5EA6 | \u5B8C\u6210\u65E5\u671F | \u5907\u6CE8 |
|
|
3560
3557
|
|------|----------|------|------|---------|------|
|
|
3561
3558
|
${newRow}
|
|
3562
3559
|
`;
|
|
3563
|
-
|
|
3560
|
+
} else {
|
|
3561
|
+
const lines = content.split("\n");
|
|
3562
|
+
const lastIndex = lines.findLastIndex((line) => line.trim().startsWith("|") && !line.includes("---"));
|
|
3563
|
+
if (lastIndex !== -1) {
|
|
3564
|
+
lines.splice(lastIndex + 1, 0, newRow);
|
|
3565
|
+
content = lines.join("\n");
|
|
3564
3566
|
} else {
|
|
3565
3567
|
content += `
|
|
3566
|
-
## \u529F\u80FD\u6E05\u5355 (Feature Inventory)
|
|
3567
|
-
|
|
3568
|
-
| \u529F\u80FD | Spec \u6587\u4EF6 | \u72B6\u6001 | \u8FDB\u5EA6 | \u5B8C\u6210\u65E5\u671F | \u5907\u6CE8 |
|
|
3569
|
-
|------|----------|------|------|---------|------|
|
|
3570
3568
|
${newRow}
|
|
3571
3569
|
`;
|
|
3572
3570
|
}
|
|
3573
|
-
} else {
|
|
3574
|
-
const tableHeaderPattern = /(\| 功能 \| Spec 文件 \| 状态 \| 进度 \| 完成日期 \| 备注 \|(?:\r?\n)?)/;
|
|
3575
|
-
if (tableHeaderPattern.test(content)) {
|
|
3576
|
-
content = content.replace(tableHeaderPattern, `$1
|
|
3577
|
-
${newRow}$2`);
|
|
3578
|
-
} else {
|
|
3579
|
-
content = content.replace(
|
|
3580
|
-
/## 功能清单 \(Feature Inventory\)/,
|
|
3581
|
-
`## \u529F\u80FD\u6E05\u5355 (Feature Inventory)
|
|
3582
|
-
|
|
3583
|
-
| \u529F\u80FD | Spec \u6587\u4EF6 | \u72B6\u6001 | \u8FDB\u5EA6 | \u5B8C\u6210\u65E5\u671F | \u5907\u6CE8 |
|
|
3584
|
-
|------|----------|------|------|---------|------|
|
|
3585
|
-
${newRow}`
|
|
3586
|
-
);
|
|
3587
|
-
}
|
|
3588
3571
|
}
|
|
3589
3572
|
await FileUtils.write(aiMemoryFile, content);
|
|
3590
3573
|
logger.success("AI_MEMORY.md \u5DF2\u66F4\u65B0");
|