mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-03 11:24:57 -05:00
WIP cleanup of AI Copilot code: - Create util/validation.py with UUID validation helpers - Create tools/helpers.py with shared utilities: - get_inputs_from_schema() for extracting input fields from JSON schema - error_response() for standardized error responses - format_inputs_as_markdown() for formatting inputs - Add shared credential matching utilities to utils.py: - get_user_credentials() - fetch user's available credentials - find_matching_credential() - find a credential matching requirements - create_credential_meta_from_match() - create CredentialsMetaInput - match_credentials_to_requirements() - core matching logic - Refactor match_user_credentials_to_graph() to use shared matching logic - Refactor run_block._check_block_credentials() to use shared matching logic - Update run_agent.py to use shared get_inputs_from_schema helper - Update run_block.py to use shared get_inputs_from_schema helper - Extract _create_stream_generator() in routes.py to eliminate duplicate event generators - Extract SSE_RESPONSE_HEADERS constant This reduces code duplication and improves maintainability.