Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several improvements and refactorings to the skill discovery and validation logic in the codebase, as well as a minor fix to embedding dimension handling and a small code style update. The most significant changes involve refactoring skill metadata parsing into smaller helper functions for better maintainability and clarity, improving validation logic, and correcting the embedding dimension for a Google model.
Skill discovery and parsing refactor:
discover_skillsfunction inagentflow/skills/loader.pyto delegate parsing and validation of each skill to a new_discover_skillhelper, which uses additional helpers for extracting identity, metadata, triggers, resources, tags, and priority. This modularizes the logic, improves readability, and makes the code easier to maintain. [1] [2]_discover_skill,_extract_identity,_metadata_block,_normalize_text_list,_resolve_resources,_normalize_tags,_parse_priority, and_extract_frontmatter_yamlto encapsulate and clarify the parsing and validation of skill metadata.Skill validation improvements:
SkillMetamodel's field validators fortriggersandresourcesinagentflow/skills/models.pyto use more explicit variable names, ensure cleaned/stripped values, and provide clearer error handling for invalid or empty entries.Embedding model fix:
"gemini-embedding-001"Google embedding model from768to3072inagentflow/store/embedding/google_embedding.pyto reflect the correct dimensionality.Minor code cleanup:
# noqa: PLR0912comment from thediscover_skillsfunction definition for better code style.Bugfix in conversation state handling:
agentflow/graph/utils/utils.pyto use unpacking ([*existing_state.context, new_msg]) for clarity and consistency.