momo-ai 1.0.8 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "momo-ai",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Rachel Momo ( OpenSpec )",
5
5
  "main": "src/momo.js",
6
6
  "bin": {
@@ -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 -->
@@ -261,8 +261,11 @@ const _ioFile = async (baseDir) => {
261
261
 
262
262
  // 检查目标文件是否已存在
263
263
  if (fs.existsSync(targetPath)) {
264
- // 目标文件已存在,根据用户选择决定是否覆盖
265
- if (shouldOverwrite) {
264
+ // 跳过 specification/ 目录下的所有文件
265
+ if (file.target.startsWith("specification/")) {
266
+ Ec.waiting("跳过文件:" + file.target + " ".yellow + "(specification目录下的文件可能已被修改)".yellow);
267
+ } else if (shouldOverwrite) {
268
+ // 目标文件已存在,根据用户选择决定是否覆盖(非specification目录下的文件)
266
269
  Ec.waiting("覆盖模板文件:" + file.target);
267
270
  await fsAsync.copyFile(sourcePath, targetPath);
268
271
  } else {
@@ -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
- Ec.waiting(`${index + 1}. [${task.status}] ${task.title} (${coloredName}), ${task.path}`);
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)) {