Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@hlshen
Copy link
Contributor

@hlshen hlshen commented Jul 15, 2025

Fixes an issue where language server was writing the wrong path to .graphqlrc

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.

Summary of Changes

Hello @hlshen, 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 primarily addresses a bug where the language server was generating incorrect relative paths for .graphqlrc configuration files, especially for projects with nested dataconnect directories. The core fix involves refining the path calculation logic to ensure accurate relative paths from the workspace root. Additionally, I've performed some minor code cleanup by removing previously disabled and commented-out code.

Highlights

  • Correcting Relative Paths for DataConnect Configurations: I've updated the relativePath getter within ResolvedDataConnectConfig in firebase-vscode/src/data-connect/config.ts. Previously, it only extracted the last segment of the path, which was insufficient for nested dataconnect folders and led to the language server writing incorrect paths to .graphqlrc files. The change now uses path.relative(vscode.workspace.rootPath, this.path) to accurately calculate the path relative to the workspace root, ensuring the language server correctly identifies and uses these configuration files.
  • Codebase Cleanup in Language Client Setup: I've removed a block of commented-out code in firebase-vscode/src/data-connect/language-client.ts that was related to a file system watcher for .graphqlrc files. This code was explicitly marked as disabled for testing purposes and is no longer needed, contributing to a cleaner and more maintainable codebase.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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
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 fixes an issue with incorrect relative path generation for Data Connect configurations. The change to use path.relative is a good improvement. I've suggested one refinement to make the path resolution more robust, especially in multi-root workspace scenarios, by using getConfigPath() consistently. The removal of commented-out code is a welcome cleanup.

@hlshen hlshen enabled auto-merge (squash) July 16, 2025 16:55
@hlshen hlshen merged commit 1b26e02 into master Jul 16, 2025
48 of 50 checks passed
@hlshen hlshen deleted the hlshen/ls-path branch July 16, 2025 17:05
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Jul 16, 2025
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.

2 participants