refactor: define and export helper API for Extensions#251
Conversation
Summary of ChangesHello @ishymko, 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 refactors the management of A2A protocol extensions by introducing explicit Highlights
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
|
cd98511 to
b52fe04
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the handling of A2A protocol extension identifiers by introducing dedicated types (ExtensionId, ExtensionIds) and a set of utility functions. This improves type safety and centralizes the logic for parsing and formatting extension headers. The changes are applied consistently across client and server-side code, including service parameter creation, context management, and request handlers. The tests are also updated and expanded to cover the new utilities.
My review focuses on a couple of critical runtime errors due to unhandled undefined values from request headers, and some suggestions to improve code clarity and maintainability.
a79f8de to
dfb41df
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a dedicated ExtensionId type and an ExtensionIds utility object to manage A2A protocol extensions. This refactoring centralizes the logic for parsing, serializing, and managing extension identifiers, improving type safety and code organization. The changes are consistently applied across the client and server components, and new unit tests have been added to ensure the correctness of the ExtensionIds utility. The removal of the getRequestedExtensions utility from src/server/utils.ts and its replacement with the new ExtensionIds.parseServiceParameter is a good cleanup.
dfb41df to
1655f24
Compare
1655f24 to
d002f97
Compare
342309e to
d2545ba
Compare
d2545ba to
907dcf8
Compare
Description
Define types and utility functions for extensions to export for external usage and share between client and server.
Re #218 #219