feat: Add metadata support to Part types#658
Conversation
Summary of ChangesHello @ehsavoie, 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 enhances the A2A protocol implementation by adding support for an optional metadata field to 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 successfully adds support for an optional metadata field to TextPart, FilePart, and DataPart, which is a great enhancement for providing more context. The changes correctly update the domain objects, JSON serializers/deserializers, and gRPC mappers.
My review includes a few suggestions to improve the implementation:
- A critical fix for invalid characters in
pom.xml. - A fix for a potential
NullPointerExceptionin theDataPartbuilder. - Suggestions for refactoring to reduce code duplication.
- A recommendation to add tests for the new metadata functionality to ensure correctness.
I also noticed that a dependency for testcontainers was added in pom.xml. This seems unrelated to the main goal of this PR. It's generally a good practice to keep pull requests focused on a single feature or fix to make them easier to review and merge.
jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/json/JsonUtil.java
Outdated
Show resolved
Hide resolved
870188f to
88146ca
Compare
...ificationconfigstore/database/jpa/JpaDatabasePushNotificationConfigStoreIntegrationTest.java
Outdated
Show resolved
Hide resolved
This reverts commit 14e5eeb.
447c543 to
f8b4100
Compare
Add optional metadata field to TextPart, FilePart, and DataPart records to support additional contextual information for message and artifact content parts as specified in the A2A protocol v1.0. Changes: - Add metadata parameter to Part constructors (TextPart, FilePart, DataPart) - Update PartMapper to convert metadata between domain and gRPC proto - Update JsonUtil PartTypeAdapter to serialize/deserialize metadata Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Add optional metadata field to TextPart, FilePart, and DataPart records to support additional contextual information for message and artifact content parts as specified in the A2A protocol v1.0.
Changes:
Fixes #649 🦕