refactor: fix-borders 升级改名为 fix-meta,新增 trim 破坏识别

- 改名 fix-borders → fix-meta(CLI 子命令 fix-meta;MCP tool meta_fix),名字更通用
- 新增第三类噪音识别:trimType 从 none 被 Cocos 改成自动裁剪(连带 width/height/
  offset/顶点全变)→ 还原该 frame 到 git(恢复不裁剪)。保守:只还原 git=none 的
  明确破坏,不碰 git 本就 auto 的(分不清破坏 vs 真改)
- 三类统一处理:① 纯顺序/格式噪音 ② 九宫格 border 重置 ③ trim 强改

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
furao
2026-06-07 19:00:47 +08:00
parent 7ae2f994cf
commit f54f0762ef
5 changed files with 66 additions and 49 deletions
+3 -3
View File
@@ -488,9 +488,9 @@ function buildToolCtx() {
cleanDevDir: function () { return exports.methods.cleanDevDir(); },
getStatus: function () { return exports.methods.getStatus(); },
reloadPackage: doRestartSelf,
fixResetBorders: function (opts) {
var mod = require('./cli/src/editor/fix-borders.js');
return mod.fixResetBorders(Editor.Project.path, opts || {});
fixMeta: function (opts) {
var mod = require('./cli/src/editor/fix-meta.js');
return mod.fixMeta(Editor.Project.path, opts || {});
},
},
};