Fix ActionDragPath subscript error in CUA drag action parsing (#SKY-7774) (#4623)

This commit is contained in:
Shuchang Zheng
2026-02-03 15:57:59 -08:00
committed by GitHub
parent 4301e3142d
commit 36f499ab9e

View File

@@ -370,12 +370,13 @@ async def parse_cua_actions(
intention=reasoning,
)
else:
start_x, start_y = whole_path[0][0], whole_path[0][1]
# ActionDragPath objects have x and y attributes
start_x, start_y = whole_path[0].x, whole_path[0].y
reasoning = reasoning or f"Drag action path: {whole_path}"
action = DragAction(
start_x=start_x,
start_y=start_y,
path=whole_path[1:],
path=[(p.x, p.y) for p in whole_path[1:]],
reasoning=reasoning,
intention=reasoning,
)