chore: 移除未使用的 ui-icon-detect 模型(80MB)

- webpage-element.onnx 为实测首选模型,运行时永远先命中;
  ui-icon-detect/model.onnx 仅作为老安装包兜底回退,无实际使用场景
- 删除模型目录(含无引用的 preprocessor_config.json),运行时去掉兜底候选
- 上一个提交给打包加的 ui-icon-detect 拷贝行随之移除
- 注:git 历史中该 blob 仍存在(不做历史改写),仅工作区与新 clone 不再需要下载该模型
This commit is contained in:
yu committed 2026-11-05 17:27:08 +08:00
1 parent 5a3d4cbdbd
commit 79bba4296f
4 files changed
+2 -16

No files matched your search

+2 -3
View File
@@ -41,11 +41,10 @@ export function localUiModelPath(): string {
app.getAppPath() ? path.join(app.getAppPath(), "resources") : "",
path.join(app.getAppPath(), "temp", "models")
].filter(Boolean);
// webpage-element 是实测后的首选模型;保留旧模型作为老安装包的兼容回退。
// webpage-element 是实测后的首选模型(旧 ui-icon-detect/model.onnx 兜底已移除,不再维护)
const fileCandidates = rootCandidates.flatMap(root => [
path.join(root, "models", "ui-element-detect", "webpage-element.onnx"),
path.join(root, "webpage-element.onnx"),
path.join(root, "models", "ui-icon-detect", "model.onnx")
path.join(root, "webpage-element.onnx")
]);
const found = fileCandidates.find(candidate => {
try { return fs.existsSync(candidate) && fs.statSync(candidate).isFile(); }