Conversation
Summary of ChangesHello, 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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)
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
- Adhere to the project's linting and formatting standards (ESLint, Prettier). (link)
- Ensure consistent path resolution by using a single, robust function (e.g., resolveToRealPath) for all related path validations.
- 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)
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
- Include the Apache-2.0 license header at the top of all new source code files. (link)
schemas/settings.schema.json (3664-3667)
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
- Adhere to the project's linting and formatting standards (ESLint, Prettier). (link)
|
@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. |
3f4e771 to
5158c8d
Compare
5158c8d to
9ea86bb
Compare
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