mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 22:14:52 -07:00
fix(ui): handle headless execution in credits and upgrade dialogs (#21850)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import {
|
||||
AuthType,
|
||||
openBrowserSecurely,
|
||||
shouldLaunchBrowser,
|
||||
UPGRADE_URL_PAGE,
|
||||
} from '@google/gemini-cli-core';
|
||||
import type { SlashCommand } from './types.js';
|
||||
@@ -35,6 +36,14 @@ export const upgradeCommand: SlashCommand = {
|
||||
};
|
||||
}
|
||||
|
||||
if (!shouldLaunchBrowser()) {
|
||||
return {
|
||||
type: 'message',
|
||||
messageType: 'info',
|
||||
content: `Please open this URL in a browser: ${UPGRADE_URL_PAGE}`,
|
||||
};
|
||||
}
|
||||
|
||||
try {
|
||||
await openBrowserSecurely(UPGRADE_URL_PAGE);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user