feat(planner): expose long_press/double_tap to the AI planner
This commit is contained in:
@@ -80,6 +80,40 @@ SWIPE_SPEC = ToolSpec(
|
||||
),
|
||||
)
|
||||
|
||||
LONG_PRESS_SPEC = ToolSpec(
|
||||
name="long_press",
|
||||
description="Press and hold a point on the screen, given in Scene pixel coordinates.",
|
||||
parameters=_action_parameters(
|
||||
required=["x", "y"],
|
||||
properties={
|
||||
"x": {"type": "number", "description": "X coordinate in Scene pixel space."},
|
||||
"y": {"type": "number", "description": "Y coordinate in Scene pixel space."},
|
||||
"duration_ms": {
|
||||
"type": "integer",
|
||||
"description": "Hold duration in milliseconds (ignored on some platforms).",
|
||||
"default": 1200,
|
||||
},
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
DOUBLE_TAP_SPEC = ToolSpec(
|
||||
name="double_tap",
|
||||
description="Tap a point twice quickly, given in Scene pixel coordinates.",
|
||||
parameters=_action_parameters(
|
||||
required=["x", "y"],
|
||||
properties={
|
||||
"x": {"type": "number", "description": "X coordinate in Scene pixel space."},
|
||||
"y": {"type": "number", "description": "Y coordinate in Scene pixel space."},
|
||||
"interval_ms": {
|
||||
"type": "integer",
|
||||
"description": "Milliseconds between the two taps.",
|
||||
"default": 80,
|
||||
},
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
INPUT_TEXT_SPEC = ToolSpec(
|
||||
name="input_text",
|
||||
description="Type text into the currently focused input field.",
|
||||
@@ -145,6 +179,8 @@ FINISH_TASK_SPEC = ToolSpec(
|
||||
|
||||
ACTION_TOOL_SPECS: list[ToolSpec] = [
|
||||
TAP_SPEC,
|
||||
LONG_PRESS_SPEC,
|
||||
DOUBLE_TAP_SPEC,
|
||||
SWIPE_SPEC,
|
||||
INPUT_TEXT_SPEC,
|
||||
LAUNCH_APP_SPEC,
|
||||
|
||||
Reference in New Issue
Block a user