Skip to content

fix: use full paths for ACP diff payloads#19539

Merged
scidomino merged 7 commits intogoogle-gemini:mainfrom
JagjeevanAK:jagjeevan/issue-18808
Feb 28, 2026
Merged

fix: use full paths for ACP diff payloads#19539
scidomino merged 7 commits intogoogle-gemini:mainfrom
JagjeevanAK:jagjeevan/issue-18808

Conversation

@JagjeevanAK
Copy link
Contributor

@JagjeevanAK JagjeevanAK commented Feb 19, 2026

Summary

Use full file paths in ACP diff payloads so IDE clients can render diffs correctly.

Details

Switch diff path values from fileName to filePath (with fallback when emitting tool results).

Related Issues

Closes #18808

How to Validate

  • Run the CLI in ACP mode and trigger a file edit that requires confirmation.
  • Ensure the IDE client shows a diff using the correct file path.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run
      • npx
      • Docker
      • Podman
      • Seatbelt
    • Windows
      • npm run
      • npx
      • Docker
    • Linux
      • npm run
      • npx
      • Docker

Signed-off-by: Jagjeevan Kashid <jagjeevandev97@gmail.com>
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @JagjeevanAK, 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 an issue where IDE clients were unable to correctly render diffs due to the use of incomplete file path information in ACP payloads. By transitioning to full file paths, the system now provides the necessary context for IDEs to display changes accurately, enhancing the user experience for file edits and tool results.

Highlights

  • Diff Payload Path Update: Updated the path field in ACP diff payloads to consistently use filePath instead of fileName for improved accuracy in IDE clients.
  • Fallback Mechanism for Tool Results: Implemented a fallback mechanism for tool results, prioritizing filePath but gracefully falling back to fileName if filePath is not available, ensuring robustness.
Changelog
  • packages/cli/src/zed-integration/zedIntegration.ts
    • Updated the path property within the Session class's diff payload generation to use confirmationDetails.filePath.
    • Modified the toToolCallContent function to prioritize toolResult.returnDisplay.filePath for the diff path, with a fallback to toolResult.returnDisplay.fileName if filePath is undefined.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Signed-off-by: Jagjeevan Kashid <jagjeevandev97@gmail.com>
@JagjeevanAK JagjeevanAK marked this pull request as ready for review February 19, 2026 18:04
@JagjeevanAK JagjeevanAK requested a review from a team as a code owner February 19, 2026 18:04
@gemini-cli gemini-cli bot added priority/p2 Important but can be addressed in a future release. area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt area/non-interactive Issues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automation labels Feb 19, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request correctly addresses the issue of using full file paths in ACP diff payloads for IDE clients. The changes ensure that filePath is used where available, with a fallback to fileName for compatibility. This is a good fix for the reported issue.

@JagjeevanAK
Copy link
Contributor Author

hey @gundermanc can you check this PR ?

@JagjeevanAK
Copy link
Contributor Author

hey @scidomino can you check this PR ?

@scidomino scidomino enabled auto-merge February 25, 2026 17:10
@scidomino scidomino disabled auto-merge February 25, 2026 17:35
@scidomino
Copy link
Collaborator

You have a bunch of failing tests. Please fix.

Also, in the future, don't work on issues you're not assigned to.

@gemini-cli gemini-cli bot added the help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! label Feb 25, 2026
JagjeevanAK and others added 2 commits February 28, 2026 17:31
Signed-off-by: Jagjeevan Kashid <jagjeevandev97@gmail.com>
@JagjeevanAK
Copy link
Contributor Author

@scidomino pushed a signed-off test-only fix for the two failing zedIntegration assertions. Please re-run CI when possible.

@scidomino scidomino enabled auto-merge February 28, 2026 15:42
@scidomino scidomino added this pull request to the merge queue Feb 28, 2026
Merged via the queue into google-gemini:main with commit fae0639 Feb 28, 2026
27 checks passed
BryanBradfo pushed a commit to BryanBradfo/gemini-cli that referenced this pull request Mar 5, 2026
Signed-off-by: Jagjeevan Kashid <jagjeevandev97@gmail.com>
liamhelmer pushed a commit to badal-io/gemini-cli that referenced this pull request Mar 12, 2026
Signed-off-by: Jagjeevan Kashid <jagjeevandev97@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/non-interactive Issues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automation area/platform Issues related to Build infra, Release mgmt, Testing, Eval infra, Capacity, Quota mgmt help wanted We will accept PRs from all issues marked as "help wanted". Thanks for your support! priority/p2 Important but can be addressed in a future release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gemini in ACP mode doesn't call diff tool before writing files

2 participants