fix: get_agent_card tailing slash when agent_card_path="" (#799)#800
fix: get_agent_card tailing slash when agent_card_path="" (#799)#800mwri wants to merge 4 commits intoa2aproject:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a bug in the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly fixes an issue where an extra trailing slash was added to the agent card URL when the path was empty. The changes are logical and include a new test to cover the fixed scenario. I've added a couple of minor suggestions to improve code conciseness and documentation clarity.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Made a minor change to A2ACardResolver.get_agent_card() so it doesn't introduce an spurious trailing slash when agent_card_path is empty. This allows one to get the card from a card URL without having to break it into a base and relative card path component, it's arguably a bit odd but the empty agent_card_path is technically allowed and the result of that isn't right so I think it's a reasonable improvement, and one that as far as I can see can't reasonably be not backwards compatible for anyone.
I changed one existing test, but only in a fashion such that it still tests the thing that it says it is testing... It is fine IF I understood the point of the test...
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTINGGuide.fix:which represents bug fixes, and correlates to a SemVer patch.feat:represents a new feature, and correlates to a SemVer minor.feat!:, orfix!:,refactor!:, etc., which represent a breaking change (indicated by the!) and will result in a SemVer major.bash scripts/format.shfrom the repository root to format)Fixes #799