feat(core): centralize compatibility checks and add TrueColor detection#19478
feat(core): centralize compatibility checks and add TrueColor detection#19478spencer426 merged 16 commits intomainfrom
Conversation
Introduces a ormalizePath utility function to provide consistent path representations across different operating systems. It resolves paths to absolute, converts backslashes to forward slashes, and handles Windows case-insensitivity by lowercasing the path. fix(tests): Improve tool confirmation test stability Refactors the confirmation.test.ts to ensure reliable execution of asynchronous test cases by correctly mocking and handling the sequence of events in the tool confirmation flow.
- Move updateArgs assertion in confirmation.test.ts to match execution timing. - Update shortenPath to handle both forward and backward slashes. - Refactor isWithinRoot to use normalizePath for consistent Windows behavior. - Use forward slashes for trailing separators in normalized paths.
- Fix assertion placement for updateArgs in ModifyWithEditor loop. - Remove redundant awaitConfirmation unit tests covered by resolveConfirmation integration.
- Move updateArgs assertion to accurately reflect execution flow. - Retain resolveEditorAsync mock with clarification to ensure test stability.
Summary of ChangesHello @spencer426, 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 significantly refactors the application's compatibility warning system by centralizing the logic within the core package. This change allows for broader utility of these checks beyond just the CLI, promoting a more modular and maintainable codebase. It also introduces new documentation to inform users about supported environments and provides a new setting to control the display of these warnings. Highlights
Changelog
Activity
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. 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
|
There was a problem hiding this comment.
Code Review
This pull request is a well-executed refactor, moving environment compatibility warning logic from the CLI package to the Core package. This improves modularity and allows other consumers of @google/gemini-cli-core to use these checks. The changes are accompanied by new tests and documentation updates. I've pointed out a minor inconsistency in a new test file regarding mock cleanup to ensure it aligns with the project's strict testing conventions mentioned in the PR description.
|
Hi @spencer426, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Size Change: +2.49 kB (+0.01%) Total Size: 24.5 MB
ℹ️ View Unchanged
|
Summary
This PR moves the environment compatibility warnings logic from
packages/clitopackages/core. This refactoring allows other consumers of the core package to benefit from these checks and improves the overall architectural separation of concerns.Details
compatibility.tsandcompatibility.test.tsfrompackages/cli/src/utils/topackages/core/src/utils/.packages/core/src/index.tsto export the compatibility check functions.packages/cli/src/utils/userStartupWarnings.tsand its corresponding tests to import from@google/gemini-cli-core.Windows 10: It detects if the OS is specifically Windows 10 (build < 22000).
Warning: "
experience."
JetBrains Terminal: It checks if the TERMINAL_EMULATOR environment variable is set to JetBrains-JediTerm.⚠️ JetBrains terminal detected. You may experience rendering or scrolling issues. Using an external terminal (e.g.,

Warning: "
Windows Terminal, iTerm2) is recommended."
True Color Support: It checks if the terminal supports 24-bit color by looking at the COLORTERM environment variable and⚠️ True color (24-bit) support not detected. Using a terminal with true color enabled will result in a better visual
process.stdout.getColorDepth().
Warning: "
experience."
Related Issues
Related to #17132
How to Validate
Run this in your shell to fake being inside a JetBrains IDE:
1 TERMINAL_EMULATOR=JetBrains-JediTerm npm run build-and-start
Run this to hide true color support (note: this might not work if your terminal's stdout still reports
depth, but it's the first check):
1 COLORTERM= npm run build-and-start
Pre-Merge Checklist