refactor: 屏幕截图冗余区域字段收敛(action/position_img 并入截图区域), 仅框选区域模式显示

This commit is contained in:
yu committed 2026-11-03 14:13:07 +08:00
1 parent 9e9617256d
commit b4bcee8c15
3 files changed
+6 -30

No files matched your search

+2 -2
View File
@@ -212,8 +212,8 @@ register("Image_Screenshot", async (ctx, node, args) => {
if (range === "2") {
const regionRaw = text(args, ["position", "action", "position_img"]);
if (!regionRaw.trim()) {
throw new RuntimeError("validation_error", "截图范围为「框选区域」时,position 需填写区域 JSON", {
recommendation: '在 position 填写 {"x":0,"y":0,"width":100,"height":80} 或 [x, y, width, height],或将截图范围改回「整个屏幕」'
throw new RuntimeError("validation_error", "截图范围为「框选区域」时,截图区域需填写区域 JSON", {
recommendation: '在「截图区域」点屏幕框选,或填写 {"x":0,"y":0,"width":100,"height":80},或将截图范围改回「整个屏幕」'
});
}
if (screenOrigin) {