mirror of
https://github.com/HappyLifeOk/cc-3-8-x-mcp.git
synced 2026-06-10 09:46:47 +00:00
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:
+3
-3
@@ -309,14 +309,14 @@ function defineTools(ctx) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'meta_fix_reset_border',
|
||||
description: '清理 Cocos 重启造成的图片 meta 噪音:① 纯 key 顺序/格式变化(值没变只 git diff 噪音)还原成 git 原文;② 九宫格 border(subMetas.*.userData.border*)被重置成 0 的精准还原 git 的值。靠 git 对比、正确处理中文路径。dryRun=true 只预览不写。',
|
||||
name: 'meta_fix',
|
||||
description: '清理 Cocos 重启造成的图片 meta 噪音(保守,只还原能确认是破坏的):① 纯 key 顺序/格式变化还原 git 原文;② 九宫格 border 被重置成 0 精准还原;③ trimType 从 none 被改成自动裁剪还原该 frame 到 git。靠 git 对比、正确处理中文路径。dryRun=true 只预览不写。',
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
properties: { dryRun: { type: 'boolean', description: 'true=只预览不写文件,列出将还原的 meta' } },
|
||||
},
|
||||
handler: async function (args) {
|
||||
return local.fixResetBorders({ dryRun: !!(args && args.dryRun) });
|
||||
return local.fixMeta({ dryRun: !!(args && args.dryRun) });
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user