@midscene/core 1.8.6-beta-20260527035358.0 → 1.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/prompt/common.mjs +3 -2
- package/dist/es/ai-model/prompt/common.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/prompt/common.js +3 -2
- package/dist/lib/ai-model/prompt/common.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model/prompt/common.d.ts +1 -1
- package/dist/types/device/device-options.d.ts +0 -10
- package/package.json +2 -2
package/dist/es/agent/utils.mjs
CHANGED
|
@@ -123,7 +123,7 @@ async function matchElementFromCache(context, cacheEntry, cachePrompt, cacheable
|
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
const getMidsceneVersion = ()=>"1.8.6
|
|
126
|
+
const getMidsceneVersion = ()=>"1.8.6";
|
|
127
127
|
const parsePrompt = (prompt)=>{
|
|
128
128
|
if ('string' == typeof prompt) return {
|
|
129
129
|
textPrompt: prompt,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
function bboxDescription(modelFamily) {
|
|
2
|
-
if ('gemini' === modelFamily) return 'box_2d bounding box for the target element
|
|
3
|
-
return '2d bounding box as [xmin, ymin, xmax, ymax]';
|
|
2
|
+
if ('gemini' === modelFamily) return 'box_2d bounding box for the target element as [ymin, xmin, ymax, xmax] normalized to 0-1000 relative to the screenshot. Do NOT use pixel coordinates or screenshot width/height.';
|
|
3
|
+
if ('qwen2.5-vl' === modelFamily || 'gpt-5' === modelFamily) return '2d bounding box as [xmin, ymin, xmax, ymax] in pixel coordinates relative to the screenshot.';
|
|
4
|
+
return '2d bounding box as [xmin, ymin, xmax, ymax] normalized to 0-1000 relative to the screenshot. Do NOT use pixel coordinates or screenshot width/height.';
|
|
4
5
|
}
|
|
5
6
|
export { bboxDescription };
|
|
6
7
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-model/prompt/common.mjs","sources":["../../../../src/ai-model/prompt/common.ts"],"sourcesContent":["import type { TModelFamily } from '@midscene/shared/env';\nexport function bboxDescription(modelFamily: TModelFamily | undefined) {\n if (modelFamily === 'gemini') {\n return 'box_2d bounding box for the target element
|
|
1
|
+
{"version":3,"file":"ai-model/prompt/common.mjs","sources":["../../../../src/ai-model/prompt/common.ts"],"sourcesContent":["import type { TModelFamily } from '@midscene/shared/env';\n\nexport function bboxDescription(modelFamily: TModelFamily | undefined) {\n if (modelFamily === 'gemini') {\n return 'box_2d bounding box for the target element as [ymin, xmin, ymax, xmax] normalized to 0-1000 relative to the screenshot. Do NOT use pixel coordinates or screenshot width/height.';\n }\n\n if (modelFamily === 'qwen2.5-vl' || modelFamily === 'gpt-5') {\n return '2d bounding box as [xmin, ymin, xmax, ymax] in pixel coordinates relative to the screenshot.';\n }\n\n return '2d bounding box as [xmin, ymin, xmax, ymax] normalized to 0-1000 relative to the screenshot. Do NOT use pixel coordinates or screenshot width/height.';\n}\n"],"names":["bboxDescription","modelFamily"],"mappings":"AAEO,SAASA,gBAAgBC,WAAqC;IACnE,IAAIA,AAAgB,aAAhBA,aACF,OAAO;IAGT,IAAIA,AAAgB,iBAAhBA,eAAgCA,AAAgB,YAAhBA,aAClC,OAAO;IAGT,OAAO;AACT"}
|