Add SupportedUnderstudyActions to observe system prompt
Merged
MI
10mo ago+119+119+012345678901234567890123456789-14-14-01234567890123456789
why
Observe is failing to return doubleClick as the method because it has no knowledge of the supported actions enum. Identified in #1608
what changed
- Renamed
SupportedPlaywrightActiontoSupportedUnderstudyAction - Included the list of supported actions in the observe system prompt (similar pattern to act's)
- While testing dragAndDrop functionality realized there's no conversion between elementId and xpath/selector for the target (specified in args by model consistently), so added logic to replace for that specific method
test plan
Summary by cubic
Make observe return only supported methods by passing SupportedUnderstudyAction into the system prompt. Adds doubleClick and dragAndDrop, updates handlers to use the new enum, and fixes dragAndDrop target id-to-xpath conversion; addresses STG-1206.
-
Bug Fixes
- Inject supportedActions into observe inference and prompt so returned elements include a valid, supported method.
- Convert dragAndDrop target id to xpath in act/observe and skip invalid targets while logging.
-
Refactors
- Renamed SupportedPlaywrightAction to SupportedUnderstudyAction and updated act/observe handlers.
- Expanded the supported actions with doubleClick and dragAndDrop.