Conversation
Summary of ChangesHello @kabir, 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 incorporates a series of backported changes to the Highlights
Ignored Files
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 backports several changes, primarily focused on refactoring the historyLength parameter in TaskQueryParams from Integer to a primitive int. This simplifies the logic and improves robustness by eliminating null checks. The changes are propagated consistently across the gRPC and REST transports, request handlers, and tests. Additionally, there are improvements to metadata handling in TaskManager to merge instead of overwrite, and a fix to correctly move messages from TaskStatus to the history. I've found one potential issue in the history trimming logic that seems to be an unintended side effect of these changes.
| List<Message> history; | ||
| if (params.historyLength() <= 0) { | ||
| history = new ArrayList<>(); | ||
| history = task.getHistory(); |
There was a problem hiding this comment.
When params.historyLength() is 0, it seems more correct to return an empty history list as was done previously, rather than the full task history. A historyLength of 0 typically implies that no history items are requested. This change alters the API behavior for clients that explicitly request 0 history items, as they will now receive the entire history.
| history = task.getHistory(); | |
| history = new ArrayList<>(); |
52b3137 to
9aaa434
Compare
|
Merged manually |
Just to get CI. We will merge these directly to avoid the annoying squashing