Skip to content

Conversation

@aalej
Copy link
Contributor

@aalej aalej commented Nov 26, 2025

Description

Follow up to #9515

Scenarios Tested

#!/usr/bin/env python3
import subprocess, json, time

process = subprocess.Popen(
    ['firebase', 'mcp', '--dir', '/PATH/iosProject/testApp'],
    stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, bufsize=1
)

# Step 1: Initialize - WORKS (responds immediately)
process.stdin.write(json.dumps({
    "jsonrpc": "2.0", "id": 1, "method": "initialize",
    "params": {"protocolVersion": "2024-11-05", "capabilities": {},
               "clientInfo": {"name": "test", "version": "1.0"}}
}) + '\n')
process.stdin.flush()
response = process.stdout.readline()
print(f"✓ Initialize responded: {response[:100]}")

# Step 2: Initialized notification
process.stdin.write(json.dumps({
    "jsonrpc": "2.0", "method": "notifications/initialized", "params": {}
}) + '\n')
process.stdin.flush()
time.sleep(0.5)

# Step 3: tools/list
process.stdin.write(json.dumps({
    "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}
}) + '\n')
process.stdin.flush()
response = process.stdout.readline()
tools_list = json.loads(response)['result']['tools']
print(f"✓ tools responded: {response}")
print(f"total tools: {len(tools_list)}")


for tool in tools_list:
    print(tool['name'])
    
time.sleep(10)
process.terminate()

Outputs

...
total tools: 27
firebase_login
firebase_logout
firebase_get_project
firebase_list_apps
firebase_list_projects
firebase_get_sdk_config
firebase_create_project
firebase_create_app
firebase_create_android_sha
firebase_get_environment
firebase_update_environment
firebase_init
firebase_get_security_rules
firebase_read_resources
crashlytics_create_note
crashlytics_delete_note
crashlytics_get_issue
crashlytics_list_events
crashlytics_batch_get_events
crashlytics_list_notes
crashlytics_get_top_issues
crashlytics_get_top_variants
crashlytics_get_top_versions
crashlytics_get_top_apple_devices
crashlytics_get_top_android_devices
crashlytics_get_top_operating_systems
crashlytics_update_issue

Sample Commands

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @aalej, 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 iosAppUsesCrashlytics utility function to enhance its readability and efficiency. The changes consolidate the logic for detecting various iOS project configuration files, ensuring a more streamlined and performant check for Crashlytics integration.

Highlights

  • Refactored iOS Crashlytics Detection: The iosAppUsesCrashlytics function has been refactored to streamline the detection of Crashlytics usage in iOS projects.
  • Improved File Scanning Logic: The function now uses Promise.all to concurrently scan for multiple file types (Podfile, Package.swift, Cartfile*, project.pbxproj), improving efficiency.
  • Consolidated File Processing: Instead of separate loops for each file type, all detected files are now processed in a single, unified loop, and an early exit is added if no relevant files are found.
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
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 refactors the iosAppUsesCrashlytics function to improve its clarity and performance. The changes consolidate multiple file detection calls into a single, parallelized operation using Promise.all, which is a great improvement. I've found a small opportunity to make the code even more concise by removing a redundant check. Overall, this is a solid cleanup.

Comment on lines 68 to 70
if (files.length === 0) {
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This if block is redundant. If files is an empty array, the following for...of loop will not execute, and the function will correctly return false at the end. You can remove this check to make the code more concise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point!

@aalej aalej requested a review from schnecle November 26, 2025 16:39
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