add generic swipe tool with auto-detection of direction vs coordinate params

- Added ACTION_Swipe to option/action.go for generic swipe functionality
- Implemented ToolSwipe in mcp_server.go that automatically detects parameter type:
  - String params (up/down/left/right) use direction-based swipe logic
  - Array params [fromX, fromY, toX, toY] use coordinate-based swipe logic
- Added comprehensive test coverage for ToolSwipe in mcp_server_test.go
- Updated tool registration to include the new generic swipe tool
- All tests pass, confirming backward compatibility with existing tools
This commit is contained in:
lilong.129
2025-05-26 22:39:23 +08:00
parent 8895e9e970
commit 6ae4c300c1
4 changed files with 240 additions and 1 deletions

View File

@@ -1 +1 @@
v5.0.0-beta-2505262232
v5.0.0-beta-2505262239