Skip to content

Conversation

@ZhaoHeh
Copy link
Collaborator

@ZhaoHeh ZhaoHeh commented Sep 19, 2025

Summary

This PR introduces significant refactoring and optimization to the ActionParserHelper class, including the following improvements:

Main Changes

  1. parseCoordinates: renaming and logic optimization
    • Renamed the standardlizeCoordinates method to parseCoordinates
    • Optimized coordinate parsing logic to support more formats:
      • Supports 100, 200 and 100 200 formats (no longer throws errors)
      • Extended bracket matching patterns to support <point></point> tags
      • Used a more flexible splitting rule /[,\\s]+/ to handle comma and space separators
  • Throws clear error messages when invalid numbers are parsed
  • Provides more detailed debug log output
  1. Added XML Object Standardization Methods

    • Added the standardizeGUIActionsFromXMLObject method
    • Added the standardizeActionInputsFromXMLObject method
    • Supports extracting and standardizing GUI action parameters from XML-parsed objects
  2. Logger Initialization Optimization

    • Changed the default logger name from 'XMLFormatAdapter' to undefined
    • Maintained the log level as LogLevel.DEBUG

Backward Compatibility

  • Maintains existing API interfaces
  • New methods do not affect existing functionality
  • Error handling is more robust without disrupting existing workflows

These improvements make coordinate parsing more flexible and reliable while enhancing integration capabilities with XML data sources.

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

@ZhaoHeh ZhaoHeh merged commit 1895be4 into refact/gui_agent_sdk_917_v2 Sep 19, 2025
3 checks passed
@ZhaoHeh ZhaoHeh deleted the dev/refact_gui_agent_apis_v13 branch September 19, 2025 04:20
ZhaoHeh added a commit that referenced this pull request Sep 19, 2025
ZhaoHeh added a commit that referenced this pull request Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants