@midscene/mcp 1.0.1-beta-20251112052306.0 → 1.0.1-beta-20251112060124.0
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/api.mdx +4 -4
- package/dist/index.js +26 -7
- package/package.json +5 -5
package/dist/api.mdx
CHANGED
|
@@ -346,9 +346,9 @@ function aiScroll(
|
|
|
346
346
|
- Parameters:
|
|
347
347
|
|
|
348
348
|
- `scrollParam: PlanningActionParamScroll` - The scroll parameter
|
|
349
|
-
- `direction
|
|
350
|
-
- `scrollType
|
|
351
|
-
- `distance
|
|
349
|
+
- `direction?: 'down' | 'up' | 'right' | 'left'` - The direction to scroll. Defaults to `down`. Whether it is Android or Web, the scrolling direction here all refers to which direction of the page's content will appear on the screen. For example, when the scrolling direction is `down`, the hidden content at the bottom of the page will gradually reveal itself from the bottom of the screen upwards.
|
|
350
|
+
- `scrollType?: 'singleAction' | 'scrollToBottom' | 'scrollToTop' | 'scrollToRight' | 'scrollToLeft'` - The scroll behavior. Defaults to `singleAction`.
|
|
351
|
+
- `distance?: number | null` - Optional, the distance to scroll in px. Use `null` to allow Midscene to decide automatically.
|
|
352
352
|
- `locate?: string | Object` - Optional, a natural language description of the element to scroll on, or [prompting with images](#prompting-with-images). If not provided, Midscene will perform scroll on the current mouse position.
|
|
353
353
|
- `options?: Object` - Optional, a configuration object containing:
|
|
354
354
|
- `deepThink?: boolean` - If true, Midscene will call AI model twice to precisely locate the element. False by default.
|
|
@@ -363,7 +363,7 @@ function aiScroll(
|
|
|
363
363
|
|
|
364
364
|
```typescript
|
|
365
365
|
await agent.aiScroll(
|
|
366
|
-
{ direction: 'up', distance: 100, scrollType: '
|
|
366
|
+
{ direction: 'up', distance: 100, scrollType: 'singleAction' },
|
|
367
367
|
'The form panel',
|
|
368
368
|
);
|
|
369
369
|
```
|