fix: ACP: separate conversational text from execute tool command title#23179
fix: ACP: separate conversational text from execute tool command title#23179
Conversation
|
Hi @sripasg, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
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 refactors the ACP tool execution pipeline to achieve a strict separation between raw executable commands and the agent's conversational explanations. By introducing dedicated methods for display titles and explanations, the change ensures that integrated development environments (IDEs) present only the clean, syntax-highlightable command in interactive tool call blocks, while routing any supplementary conversational context as separate preceding thought chunks. This significantly enhances the clarity and user experience when interacting with agent-suggested commands. 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. Footnotes
|
|
Size Change: +1.41 kB (+0.01%) Total Size: 26.1 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request is a good refactoring that separates the raw command from its contextual explanation for tool invocations, which will improve the UI experience in IDEs. The introduction of getDisplayTitle() and getExplanation() methods is well-implemented across the shell and mcp-tool invocations. My review identifies a critical issue in a new test that incorrectly validates the implementation, and a high-severity issue regarding code duplication that should be addressed to improve maintainability.
|
This review is provided by the Gemini CLI The pull request successfully implements the separation between the raw executable command (display title) and the contextual explanations for ACP tools. This is a solid architectural improvement that keeps IDE UIs clean. However, I've identified a few issues with the implementation, which align with the review feedback previously left by 1. High-Severity Code Duplication in
|
|
Thank you, @jacob314, for this incredibly thorough and insightful review! Your detailed analysis has pinpointed several critical areas for improvement, and I appreciate you taking the time to provide such clear and actionable feedback. I've reviewed your comments and agree with your assessment on all points. Here's a breakdown of the issues and the path forward: 1. High-Severity Code Duplication in
|
474df63 to
f836db3
Compare
|
@jacob314 - addressed all feedback .. thank you ! |
PR ReviewThanks for this PR! The separation of the conversational explanation from the core command title is a great improvement for the IDE UI, and the implementation handles backward compatibility well. I have a couple of minor suggestions to improve code maintainability and cleanliness:
Overall, the logic is solid and the tests cover the new behavior effectively. Great work! |
f836db3 to
c09097d
Compare
|
feedback applied. |
c09097d to
a6e5904
Compare
a6e5904 to
2ae20ea
Compare

Summary
Details
agent_thought_chunkupdates - and the main tool execution titles is caught by the IDE UIs cleanly (as shown in the screenshots)ShellToolInvocationby implementing a private method -getContextualDetailsto accurately map the context parameters.DiscoveredMCPToolInvocationthat truncates long JSON parameter payloads (heuristic -- exceeding 500 characters), summarizing them with just the initial root keys instead of cluttering terminal output.mcp-tool.test.tsto strictly adhere to tool schema constraints (providing the correct{command: '...'}properties)acpClient.test.tsto precisely assert against the new splitsessionUpdatejson.Related Issues
Fixes maintainers-gemini-cli#1572
How to Validate
Ensure that commands and explanations are separated out as shown in the screenshot below (after fix) with similar prompts that require approval from user for running a command.
Pre-Merge Checklist