refactor(gui-agent): enhance action parser and add comprehensive utilities #1617
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces significant enhancements to the GUI Agent SDK, focusing on
The changes improve the robustness, flexibility, and maintainability of the GUI agent system.
✨ Key Features
1. JSON Function Call Parser Support
ActionParserHelper.tsparseFunctionCallString()andparseRoughFromFunctionCall()methods2. Coordinate Normalization System
coordinateNormalizer.tswithdefaultNormalizeCoords()functionnormalizeActionCoords()for processing BaseAction coordinatespoint,start, andendcoordinate fields3. Action Standardization Framework
standardizeNames.tswith comprehensive action type mapping4. Enhanced Utility Functions
serializeActions.ts: Action serialization utilitiessystemPromptProcessor.ts: System prompt processing capabilitiessleep.ts: Async sleep utility for timing operations📝 Related Issues
This PR consolidates multiple feature enhancements and refactoring efforts:
Checklist