mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
feat(cli): make JetBrains warning more specific (#19687)
This commit is contained in:
@@ -671,6 +671,10 @@ export async function main() {
|
||||
}
|
||||
|
||||
let input = config.getQuestion();
|
||||
const useAlternateBuffer = shouldEnterAlternateScreen(
|
||||
isAlternateBufferEnabled(settings),
|
||||
config.getScreenReader(),
|
||||
);
|
||||
const rawStartupWarnings = await getStartupWarnings();
|
||||
const startupWarnings: StartupWarning[] = [
|
||||
...rawStartupWarnings.map((message) => ({
|
||||
@@ -678,7 +682,9 @@ export async function main() {
|
||||
message,
|
||||
priority: WarningPriority.High,
|
||||
})),
|
||||
...(await getUserStartupWarnings(settings.merged)),
|
||||
...(await getUserStartupWarnings(settings.merged, undefined, {
|
||||
isAlternateBuffer: useAlternateBuffer,
|
||||
})),
|
||||
];
|
||||
|
||||
// Handle --resume flag
|
||||
|
||||
@@ -88,6 +88,7 @@ const WARNING_CHECKS: readonly WarningCheck[] = [
|
||||
export async function getUserStartupWarnings(
|
||||
settings: Settings,
|
||||
workspaceRoot: string = process.cwd(),
|
||||
options?: { isAlternateBuffer?: boolean },
|
||||
): Promise<StartupWarning[]> {
|
||||
const results = await Promise.all(
|
||||
WARNING_CHECKS.map(async (check) => {
|
||||
@@ -105,7 +106,11 @@ export async function getUserStartupWarnings(
|
||||
const warnings = results.filter((w): w is StartupWarning => w !== null);
|
||||
|
||||
if (settings.ui?.showCompatibilityWarnings !== false) {
|
||||
warnings.push(...getCompatibilityWarnings());
|
||||
warnings.push(
|
||||
...getCompatibilityWarnings({
|
||||
isAlternateBuffer: options?.isAlternateBuffer,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
return warnings;
|
||||
|
||||
Reference in New Issue
Block a user