momo-ai 1.0.9 → 1.0.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.
package/package.json
CHANGED
|
@@ -4,5 +4,6 @@
|
|
|
4
4
|
分析 reference/ 下的项目,查找对应的数据模型,根据查找的数据模型更新 specification/project-model.md 文档作为当前项目所需的领域模型核心文档
|
|
5
5
|
|
|
6
6
|
1. 主要分析实体模型、关系模型、常量和枚举等。
|
|
7
|
-
2.
|
|
7
|
+
2. 基本需求文档参考 `specification/project.md`。
|
|
8
|
+
3. 若有推荐遗漏的模型在输出的 `specification/project-model.md` 中补充说明。
|
|
8
9
|
<!-- END -->
|
|
@@ -79,8 +79,7 @@ const _ioFile = async (baseDir) => {
|
|
|
79
79
|
const templateFiles = [
|
|
80
80
|
{
|
|
81
81
|
source: "specification/project.md",
|
|
82
|
-
target: "specification/project.md"
|
|
83
|
-
protect: true // 标记为受保护文件
|
|
82
|
+
target: "specification/project.md"
|
|
84
83
|
},
|
|
85
84
|
{
|
|
86
85
|
source: "specification/project-model.md",
|
|
@@ -106,11 +105,8 @@ const _ioFile = async (baseDir) => {
|
|
|
106
105
|
|
|
107
106
|
// 检查源文件是否存在且目标文件已存在
|
|
108
107
|
if (fs.existsSync(sourcePath) && fs.existsSync(targetPath)) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
hasExistingFiles = true;
|
|
112
|
-
break;
|
|
113
|
-
}
|
|
108
|
+
hasExistingFiles = true;
|
|
109
|
+
break;
|
|
114
110
|
}
|
|
115
111
|
}
|
|
116
112
|
|
|
@@ -265,11 +261,11 @@ const _ioFile = async (baseDir) => {
|
|
|
265
261
|
|
|
266
262
|
// 检查目标文件是否已存在
|
|
267
263
|
if (fs.existsSync(targetPath)) {
|
|
268
|
-
//
|
|
269
|
-
if (file.
|
|
270
|
-
Ec.waiting("
|
|
264
|
+
// 跳过 specification/ 目录下的所有文件
|
|
265
|
+
if (file.target.startsWith("specification/")) {
|
|
266
|
+
Ec.waiting("跳过文件:" + file.target + " ".yellow + "(specification目录下的文件可能已被修改)".yellow);
|
|
271
267
|
} else if (shouldOverwrite) {
|
|
272
|
-
//
|
|
268
|
+
// 目标文件已存在,根据用户选择决定是否覆盖(非specification目录下的文件)
|
|
273
269
|
Ec.waiting("覆盖模板文件:" + file.target);
|
|
274
270
|
await fsAsync.copyFile(sourcePath, targetPath);
|
|
275
271
|
} else {
|
|
@@ -416,7 +412,6 @@ module.exports = (options) => {
|
|
|
416
412
|
.then(() => _ioFile(basePath))
|
|
417
413
|
.then(() => {
|
|
418
414
|
Ec.info('✅ SPEC / 项目初始化完成!');
|
|
419
|
-
Ec.waiting('💡 注意:specification/project.md 文件需要人工填写项目基本信息和需求信息');
|
|
420
415
|
// 关闭 readline 接口
|
|
421
416
|
Ec.askClose();
|
|
422
417
|
// 退出程序
|
|
@@ -197,7 +197,7 @@ module.exports = async (options) => {
|
|
|
197
197
|
} else {
|
|
198
198
|
Ec.waiting(`⚠️ 发现 ${taskInstances.length} 个重复任务 ${taskName}:`);
|
|
199
199
|
taskInstances.forEach((task, index) => {
|
|
200
|
-
Ec.waiting(` ${index + 1}. ${task.path}`);
|
|
200
|
+
Ec.waiting(` ${String(index + 1).padStart(3, '0')}. ${task.path}`);
|
|
201
201
|
});
|
|
202
202
|
|
|
203
203
|
// 执行剪切板任务
|
|
@@ -266,8 +266,10 @@ module.exports = async (options) => {
|
|
|
266
266
|
// 列出所有任务(包含路径和状态,状态在前)
|
|
267
267
|
Ec.waiting(`📊 共找到 ${tasks.length} 个任务:`);
|
|
268
268
|
tasks.forEach((task, index) => {
|
|
269
|
+
const paddedIndex = String(index + 1).padStart(3, '0');
|
|
269
270
|
const coloredName = task.name.cyan;
|
|
270
|
-
|
|
271
|
+
const coloredPath = task.path.yellow; // 使用黄色高亮路径
|
|
272
|
+
Ec.waiting(`${paddedIndex}. ${coloredName} | ${task.title} / ${coloredPath}`);
|
|
271
273
|
});
|
|
272
274
|
|
|
273
275
|
// 执行剪切板任务(使用第一个任务)
|
|
@@ -288,7 +290,7 @@ module.exports = async (options) => {
|
|
|
288
290
|
* @param {Array} taskInstances 任务实例列表
|
|
289
291
|
*/
|
|
290
292
|
const _handleClipboardTask = async (taskName, taskInstances) => {
|
|
291
|
-
//
|
|
293
|
+
// 读取模板文件并填充参数,然后拷贝到剪贴板
|
|
292
294
|
const templatePath = path.resolve(__dirname, '../_template/PROMPT/tasks.md.ejs');
|
|
293
295
|
|
|
294
296
|
if (fs.existsSync(templatePath)) {
|