Compare commits

...

2 Commits

5 changed files with 43 additions and 32 deletions

View File

@ -3315,14 +3315,14 @@
{
"id": "Image_Click_V1",
"name": "点击图像",
"canonical": "Image_Click_V2",
"canonical": "Image_Click_V3",
"status": "hide",
"reason": "同名旧版本或重复别名,保留执行兼容"
},
{
"id": "Image_Click",
"name": "点击图像",
"canonical": "Image_Click_V2",
"canonical": "Image_Click_V3",
"status": "hide",
"reason": "同名旧版本或重复别名,保留执行兼容"
},

View File

@ -315,7 +315,7 @@
"description": "图片文件的完整路径,用于匹配或识别;点右侧按钮选择文件"
},
"accuracy": {
"description": "填写参数值,支持 ${变量} 引用上游输出",
"description": "模板相似度阈值(0~1,越大越严格):0.9 表示屏幕上至少 90% 像素与模板一致才算找到。框选的模板与实际界面光照/渲染略有差异时可适当调低,如无特殊需求建议 0.8。",
"placeholder": "输入内容或 ${变量}"
},
"accuracy2": {
@ -345,7 +345,7 @@
"Image_Find_V1": {
"fields": {
"window_obj": {
"description": "目标窗口对象;留空则作用于当前活动窗口"
"description": "目标窗口标题,留空则作用于当前活动窗口;点「选窗口」从可见窗口列表中选择"
},
"action": {
"description": "区域坐标 JSON;点右侧「屏幕框选」在屏幕上框选生成",
@ -356,40 +356,39 @@
"placeholder": "{\"x\":0,\"y\":0,\"width\":100,\"height\":50}"
},
"image": {
"description": "图片文件的完整路径,用于匹配或识别;点右侧按钮选择文件"
"description": "模板图片文件的完整路径,用于匹配识别;点右侧「屏幕截取」可框选屏幕上的目标图案"
}
}
},
"Image_Exists_V1": {
"fields": {
"image": {
"description": "图片文件的完整路径,用于匹配或识别;点右侧按钮选择文件"
"description": "模板图片文件的完整路径,用于匹配识别;点右侧「屏幕截取」可框选屏幕上的目标图案"
},
"accuracy": {
"description": "填写参数值,支持 ${变量} 引用上游输出",
"placeholder": "输入内容或 ${变量}"
"description": "相似度阈值(0~1,越大越严格):0.9 表示屏幕上至少 90% 像素与模板一致才算找到。建议 0.8~0.9。"
}
}
},
"Image_CropImg": {
"fields": {
"file_path": {
"description": "图片文件的完整路径,用于匹配或识别;点右侧按钮选择文件"
"description": "要被裁剪的源图片完整路径——本组件从已有图片文件中裁出区域,不是截屏;截屏请用「截图图像」组件"
},
"imagePath": {
"description": "文件夹的完整路径;点右侧按钮浏览选择,支持 ${变量} 引用"
},
"xstart": {
"description": "填写参数值,支持 ${变量} 引用上游输出"
"description": "裁剪区域左上角的 x 坐标(图片上的像素)"
},
"xend": {
"description": "填写参数值,支持 ${变量} 引用上游输出"
"description": "裁剪区域右下角的 x 坐标,需大于起点 x"
},
"ystart": {
"description": "填写参数值,支持 ${变量} 引用上游输出"
"description": "裁剪区域左上角的 y 坐标(图片上的像素)"
},
"yend": {
"description": "填写参数值,支持 ${变量} 引用上游输出"
"description": "裁剪区域右下角的 y 坐标,需大于起点 y"
}
}
},
@ -406,7 +405,7 @@
"Image_Click_V3": {
"fields": {
"window_obj": {
"description": "目标窗口对象;留空则作用于当前活动窗口"
"description": "目标窗口标题,留空则作用于当前活动窗口;点「选窗口」从可见窗口列表中选择"
},
"action": {
"description": "区域坐标 JSON;点右侧「屏幕框选」在屏幕上框选生成",
@ -1231,4 +1230,4 @@
}
}
}
}
}

View File

@ -10,7 +10,7 @@
"vendor": 997,
"native": 16,
"triggers": 3,
"fields": 4297
"fields": 4294
},
"groups": [
{
@ -67155,7 +67155,7 @@
"required": false,
"defaultValue": "",
"placeholder": "{\"x\":0,\"y\":0,\"width\":100,\"height\":50}",
"description": "截图范围为「框选区域」时生效:点右侧「屏幕框选」在屏幕上框选生成区域坐标",
"description": "区域坐标 JSON;点右侧「屏幕框选」在屏幕上框选生成",
"advanced": false,
"valueTypes": []
},
@ -68078,7 +68078,11 @@
"value": "2"
}
],
"description": "在整个虚拟桌面(含副屏)中查找,或仅在指定窗口范围内查找"
"description": "在整个虚拟桌面(含副屏)中查找,或仅在指定窗口范围内查找",
"valueTypes": [
"string"
],
"type": "string"
},
{
"key": "window_obj",
@ -68087,7 +68091,8 @@
"displayType": "text-expression",
"defaultValue": "",
"required": false,
"description": "目标窗口标题,留空则作用于当前活动窗口;点「选窗口」从可见窗口列表中选择"
"description": "目标窗口标题,留空则作用于当前活动窗口;点「选窗口」从可见窗口列表中选择",
"type": "string"
},
{
"key": "image",
@ -68096,16 +68101,18 @@
"displayType": "imageSelector",
"defaultValue": "",
"required": true,
"description": "模板图片文件的完整路径,用于匹配识别;点右侧「屏幕截取」可框选屏幕上的目标图案"
"description": "模板图片文件的完整路径,用于匹配识别;点右侧「屏幕截取」可框选屏幕上的目标图案",
"type": "string"
},
{
"key": "accuracy",
"label": "模板相似度",
"widget": "similaritySlider",
"widget": "text",
"displayType": "similaritySlider",
"defaultValue": "0.9",
"required": true,
"description": "相似度阈值(0~1,越大越严格):0.9 表示屏幕上至少 90% 像素与模板一致才算找到。建议 0.8~0.9。"
"description": "相似度阈值(0~1,越大越严格):0.9 表示屏幕上至少 90% 像素与模板一致才算找到。建议 0.8~0.9。",
"type": "string"
}
],
"output": {
@ -68178,7 +68185,8 @@
"value": "2"
}
],
"description": "在整个虚拟桌面(含副屏)中查找,或仅在指定窗口范围内查找"
"description": "在整个虚拟桌面(含副屏)中查找,或仅在指定窗口范围内查找",
"type": "string"
},
{
"key": "window_obj",
@ -68187,7 +68195,8 @@
"displayType": "text-expression",
"defaultValue": "",
"required": false,
"description": "目标窗口标题,留空则作用于当前活动窗口;点「选窗口」从可见窗口列表中选择"
"description": "目标窗口标题,留空则作用于当前活动窗口;点「选窗口」从可见窗口列表中选择",
"type": "string"
},
{
"key": "image",
@ -68196,16 +68205,18 @@
"displayType": "imageSelector",
"defaultValue": "",
"required": true,
"description": "模板图片文件的完整路径,用于匹配识别;点右侧「屏幕截取」可框选屏幕上的目标图案"
"description": "模板图片文件的完整路径,用于匹配识别;点右侧「屏幕截取」可框选屏幕上的目标图案",
"type": "string"
},
{
"key": "accuracy",
"label": "模板相似度",
"widget": "similaritySlider",
"widget": "text",
"displayType": "similaritySlider",
"defaultValue": "0.9",
"required": true,
"description": "相似度阈值(0~1,越大越严格):0.9 表示屏幕上至少 90% 像素与模板一致才算找到。建议 0.8~0.9。"
"description": "相似度阈值(0~1,越大越严格):0.9 表示屏幕上至少 90% 像素与模板一致才算找到。建议 0.8~0.9。",
"type": "string"
},
{
"key": "timeout",
@ -68214,7 +68225,8 @@
"displayType": "text-expression",
"defaultValue": "0",
"required": false,
"description": "大于 0 时在该时间内每隔 0.3 秒重试查找,超时仍未找到才返回 false"
"description": "大于 0 时在该时间内每隔 0.3 秒重试查找,超时仍未找到才返回 false",
"type": "string"
}
],
"output": {
@ -68710,7 +68722,7 @@
{
"key": "accuracy",
"label": "相似度",
"widget": "similaritySlider",
"widget": "text",
"type": "string",
"displayType": "similaritySlider",
"required": true,

View File

@ -31,7 +31,7 @@ describe("catalog capability properties", () => {
const excludedIds = new Set(excluded.ids);
const hidden = new Set((duplicates.decisions as Array<{ id: string; status: string; canonical?: string }>).filter((item) => item.status === "hide").map((item) => item.id));
const visible: CatalogComponent[] = catalog.components.filter((component) => !excludedIds.has(component.id) && !hidden.has(component.id));
expect(visible).toHaveLength(658);
expect(visible).toHaveLength(654);
const ids = visible.map((component) => component.id);
expect(new Set(ids).size).toBe(ids.length);

View File

@ -7,8 +7,8 @@ describe("duplicate capability policy", () => {
const decisions = audit.decisions as Array<{ id: string; status: string; canonical?: string }>;
const kept = decisions.filter((item) => item.status === "keep");
const hidden = decisions.filter((item) => item.status === "hide");
expect(kept.length).toBe(658);
expect(hidden.length).toBe(236);
expect(kept.length).toBe(654);
expect(hidden.length).toBe(240);
expect(audit.editableBefore).toBe(kept.length + hidden.length);
expect(audit.editableAfter).toBe(kept.length);
const keptIds = new Set(kept.map((item) => item.id));