Skip to content

Conversation

@leonardommello
Copy link

Description

Brief description of changes

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • I have tested these changes locally
  • My code follows the project's style
  • I have updated the documentation if needed

Copilot AI review requested due to automatic review settings November 6, 2025 20:46
@gemini-code-assist
Copy link

Summary of Changes

Hello @leonardommello, 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 delivers crucial bug fixes and enhancements for the MCP tool, primarily focusing on improving its compatibility and operational stability on Windows systems. It addresses issues with command execution by adapting to platform-specific shell requirements and updates the interaction with the Gemini CLI to align with its latest argument syntax. Additionally, logging behavior has been optimized to prevent unintended output interference, and development dependencies have been cleaned up, contributing to a more robust and efficient tool.

Highlights

  • Windows Compatibility Fix: Implemented platform-specific handling for command execution on Windows, ensuring that .cmd and .bat files are correctly found and executed by setting shell: true for spawn processes on win32 platforms.
  • Gemini CLI Syntax Update: Adjusted the command argument parsing for the Gemini CLI to reflect a change where the prompt is now passed as a positional argument rather than using a dedicated flag (e.g., -p).
  • Logging Behavior Refinement: Modified the logging utility to conditionally output log, warn, and debug messages only when DEBUG is true or NODE_ENV is development, preventing interference with the stdio protocol in production environments.
  • Dependency Cleanup: Removed nodemon and its associated transitive dependencies from package-lock.json, streamlining the project's development dependencies.
  • Version Bump: The project version has been updated from 1.1.4 to 1.1.5 in package.json and src/index.ts to reflect these bug fixes and improvements.
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

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the gemini-cli-mcp tool to version 1.1.5 with improvements to logging, CLI command syntax, and cross-platform compatibility.

Key Changes:

  • Conditional debug logging to prevent interference with MCP stdio protocol in production
  • Updated Gemini CLI command syntax to use positional arguments instead of -p flag
  • Platform-specific shell configuration for better Windows support

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/utils/logger.ts Adds conditional logging based on DEBUG/NODE_ENV environment variables; only errors are always logged to avoid stdio interference
src/utils/geminiExecutor.ts Updates CLI invocation to use positional arguments for prompts instead of -p flag, applied consistently to both main and fallback execution paths
src/utils/commandExecutor.ts Implements platform-specific shell configuration (shell: true on Windows for .cmd/.bat support, shell: false on Unix for security)
src/index.ts Version bump to 1.1.5 and code formatting improvements (separated statements onto individual lines)
package.json Version bump to 1.1.5 and removal of unused nodemon dependency
package-lock.json Removal of nodemon and its transitive dependencies (chokidar, anymatch, braces, etc.)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@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 a fix for running the MCP tool on Windows by enabling the shell when spawning commands. It also updates the Gemini CLI command syntax to use a positional argument for the prompt and refactors the logging to be suppressible in production. The Windows fix is correct, but it introduces a potential security risk due to manual argument quoting in another file. Additionally, the logging changes have a bug where important warnings are suppressed in production, and the use of console.warn for all log levels is semantically confusing.

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.

1 participant