fix: add direction parameter support for scroll operations in UI-TARS parser

- Handle direction parameter in convertProcessedArgs for scroll actions
- Ensure scroll operations map to swipe with both coordinates and direction
- Add comprehensive test coverage for scroll action parsing
- Fix issue where scroll direction was missing from tool call arguments
This commit is contained in:
lilong.129
2025-06-10 16:40:10 +08:00
parent c322d7c36c
commit 98bd41ff33
5 changed files with 105 additions and 3 deletions
+2 -2
View File
@@ -39,7 +39,7 @@ var doubao_1_5_ui_tars_action_mapping = map[string]option.ActionName{
"drag": option.ACTION_Drag,
"hotkey": option.ACTION_KeyCode,
"type": option.ACTION_Input,
"scroll": option.ACTION_Scroll,
"scroll": option.ACTION_Swipe, // swipe up/down/left/right
"wait": option.ACTION_Sleep,
"finished": option.ACTION_Finished,
}
@@ -136,7 +136,7 @@ var doubao_1_5_thinking_vision_pro_action_mapping = map[string]option.ActionName
"drag": option.ACTION_Drag,
"hotkey": option.ACTION_KeyCode,
"type": option.ACTION_Input,
"scroll": option.ACTION_Scroll,
"scroll": option.ACTION_Swipe, // swipe up/down/left/right
"wait": option.ACTION_Sleep,
"finished": option.ACTION_Finished,
}