feat(core): centralize compatibility checks and add TrueColor detection (#19478)

This commit is contained in:
Spencer
2026-02-18 19:01:23 -05:00
committed by GitHub
parent ef65498031
commit c62340675a
10 changed files with 301 additions and 13 deletions

View File

@@ -7,7 +7,7 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import process from 'node:process';
import { homedir } from '@google/gemini-cli-core';
import { homedir, getCompatibilityWarnings } from '@google/gemini-cli-core';
import type { Settings } from '../config/settingsSchema.js';
import {
isFolderTrustEnabled,
@@ -84,5 +84,11 @@ export async function getUserStartupWarnings(
const results = await Promise.all(
WARNING_CHECKS.map((check) => check.check(workspaceRoot, settings)),
);
return results.filter((msg) => msg !== null);
const warnings = results.filter((msg) => msg !== null);
if (settings.ui?.showCompatibilityWarnings !== false) {
warnings.push(...getCompatibilityWarnings());
}
return warnings;
}