Skip to content

Fix theme response key#25613

Open
renuka16032007 wants to merge 1 commit intogoogle-gemini:mainfrom
renuka16032007:fix-theme-response-key
Open

Fix theme response key#25613
renuka16032007 wants to merge 1 commit intogoogle-gemini:mainfrom
renuka16032007:fix-theme-response-key

Conversation

@renuka16032007
Copy link
Copy Markdown

@renuka16032007 renuka16032007 commented Apr 18, 2026

Summary

"Added the missing response key to the theme text validation schema to align with documentation."

Related Issues

Fixes#25610

How to Validate

"Run gemini --version with a custom theme that includes a text.response key."

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/u)
  • 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

@renuka16032007 renuka16032007 requested a review from a team as a code owner April 18, 2026 08:27
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 introduces a new configuration key for theme responses and improves the stability of path resolution and test execution. The changes ensure that path normalization does not crash on excessively long paths and provide more headroom for asynchronous test operations.

Highlights

  • Schema Update: Added a new 'response' key to the theme settings schema.
  • Path Resolution Robustness: Added error handling to path resolution to gracefully handle ENAMETOOLONG errors.
  • Test Infrastructure: Increased the default timeout for pollCommand in the test rig from 30 seconds to 120 seconds.
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.

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 error handling for long paths in resolvePath.ts, increases the polling timeout in the test rig, and adds a response property to the settings schema. Feedback includes correcting inconsistent indentation across multiple files, removing a debug comment that displaces the license header, and addressing a logic error where path.normalize is incorrectly expected to throw ENAMETOOLONG. It is also recommended to use resolveToRealPath for better security and consistency.

I am having trouble creating individual review comments. Click here to see my feedback.

packages/cli/src/utils/resolvePath.ts (20-28)

security-high high

The indentation in this block is inconsistent with the rest of the file. Additionally, path.normalize is a string manipulation function and does not throw ENAMETOOLONG. To ensure security and consistency, this utility should internally validate path inputs against traversal vulnerabilities and use a robust resolution function like resolveToRealPath as per repository standards.

  return resolveToRealPath(expandedPath);
References
  1. Adhere to the project's linting and formatting standards (ESLint, Prettier). (link)
  2. Ensure consistent path resolution by using a single, robust function (e.g., resolveToRealPath) for all related path validations.
  3. Utility functions that perform file system operations should validate their path inputs internally to prevent path traversal vulnerabilities.

packages/test-utils/src/test-rig.ts (1)

high

This comment appears to be a leftover debug note or a typo and should be removed. It also violates the requirement to have the license header at the top of the file.

References
  1. Include the Apache-2.0 license header at the top of all new source code files. (link)

schemas/settings.schema.json (3664-3667)

high

The indentation for the new "response" property is inconsistent with the surrounding JSON structure. Please use 2-space indentation relative to the parent object.

            },
            "response": {
              "type": "string"
            }
References
  1. Adhere to the project's linting and formatting standards (ESLint, Prettier). (link)

@renuka16032007
Copy link
Copy Markdown
Author

@GetOutOfThatGarden I've noticed the text.response key is missing from the validation schema even though it's in the documentation. This PR adds the response key to the custom theme text schema to fix the validation error.
Fixes #25610

@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Apr 18, 2026
@renuka16032007 renuka16032007 force-pushed the fix-theme-response-key branch from 3f4e771 to 5158c8d Compare April 18, 2026 09:12
@renuka16032007 renuka16032007 force-pushed the fix-theme-response-key branch from 5158c8d to 9ea86bb Compare April 18, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant