Skip to content

Conversation

@ZhaoHeh
Copy link
Collaborator

@ZhaoHeh ZhaoHeh commented Sep 21, 2025

Summary

  • Remove redundant SUPPORTED_ACTION_TYPES array and simplify type checking

    • Replace array-based type validation with direct ACTION_METADATA lookup
    • Optimize isSupportedActionType to use type in ACTION_METADATA
  • Extract system prompt template processing into reusable utility

    • Create assembleSystemPromptTemplate function in shared/utils
    • Add isSystemPromptTemplate type guard for better type safety
    • Refactor GUIAgent constructor to use new utility function
  • Fix type compatibility issues in SerializeSupportedActions

    • Align supportedActions format with expected SupportedActionType[]
    • Remove unnecessary object mapping in GUIAgent initialization
  • Rename processSystemPromptTemplate to assembleSystemPromptTemplate

    • Use more descriptive "assemble" terminology for template processing
    • Update internal variable names from "processed" to "assembled"

This refactoring improves code maintainability, reduces redundancy, and
provides better reusability for system prompt template processing across
different components.

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.

@netlify
Copy link

netlify bot commented Sep 21, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit 4c17430
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/68d02001cc5eb100081cc226
😎 Deploy Preview https://deploy-preview-1612--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ZhaoHeh ZhaoHeh merged commit c9e0ae1 into refact/gui_agent_sdk_917_v2 Sep 21, 2025
7 checks passed
@ZhaoHeh ZhaoHeh deleted the dev/refact_gui_agent_apis_v17 branch September 21, 2025 15:59
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