Skip to content

refactor(ide ext): Update port file name + switch to 1-based index for characters + remove truncation text#10501

Merged
skeshive merged 14 commits intomainfrom
ide-ext-spc-changes
Dec 12, 2025
Merged

refactor(ide ext): Update port file name + switch to 1-based index for characters + remove truncation text#10501
skeshive merged 14 commits intomainfrom
ide-ext-spc-changes

Conversation

@skeshive
Copy link
Copy Markdown
Contributor

@skeshive skeshive commented Oct 3, 2025

TLDR

  • The extension now writes a single file for port discovery (keyed by ppid-port so its guaranteed to be unique when multiple * VS code windows are open with the same ppid.
  • The cursor character is now reported as 1-based instead of 0-based for better consistency.
  • The ... [TRUNCATED] suffix on oversized selected text has been removed to since the CLI adds this now.
  • The ide/diffClosed notification has been renamed to ide/diffRejected to more accurately reflect the user's action of rejecting a proposed change.
  • Closing the diff manually no longer sends a notification back to the CLI

Linked Issues

Fixes #4800, #6848

@skeshive skeshive requested a review from a team as a code owner October 3, 2025 18:23
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @skeshive, 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 several aspects of the IDE companion extension to enhance robustness, consistency, and communication with the CLI. Key changes include improving the port discovery mechanism to prevent conflicts, standardizing cursor position reporting, and refining how diff-related events are handled and communicated, particularly by removing redundant truncation text and unnecessary notifications.

Highlights

  • Unique Port File Naming: The IDE extension now writes a single port discovery file, uniquely identified by a combination of the process ID (ppid) and the port, ensuring uniqueness even with multiple VS Code windows open.
  • 1-Based Cursor Indexing: Cursor character positions are now reported using 1-based indexing instead of 0-based, aligning with common editor conventions and improving consistency.
  • Removed Truncation Suffix: The ... [TRUNCATED] suffix, previously appended to oversized selected text, has been removed from the extension's output, as this truncation indication is now handled by the CLI.
  • Diff Notification Refinement: The notification schema for diff rejections has been updated from IdeDiffClosedNotificationSchema to IdeDiffRejectedNotificationSchema to more accurately reflect the user's action of rejecting a proposed change.
  • Manual Diff Close Notification Removal: Manually closing a diff view in the IDE no longer sends a notification back to the CLI, streamlining the communication flow.
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.

Copy link
Copy Markdown
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

This pull request introduces several refactorings and improvements to the VS Code extension. It updates the port file naming to be more robust, switches character indexing to be 1-based for consistency, and refines how oversized text selections are handled. Additionally, it renames the ide/diffClosed notification to ide/diffRejected for better clarity. The changes are well-implemented, but I've found one critical issue where the method name for the renamed notification was not updated in one place, which could break communication with the CLI.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 3, 2025

Size Change: -1.49 kB (-0.01%)

Total Size: 21.6 MB

Filename Size Change
./bundle/gemini.js 21.6 MB -1.49 kB (-0.01%)
ℹ️ View Unchanged
Filename Size
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB
./bundle/sandbox-macos-permissive-open.sb 890 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB

compressed-size-action

@skeshive skeshive enabled auto-merge October 3, 2025 19:17
@skeshive skeshive requested a review from a team as a code owner December 12, 2025 17:07
@skeshive skeshive added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit 3b2a4ba Dec 12, 2025
20 checks passed
@skeshive skeshive deleted the ide-ext-spc-changes branch December 12, 2025 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable extensibility for IDE integrations

4 participants