mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-12 23:21:27 -07:00
feat(cli): finalize profiles flag standardization and fix unknown argument error
This commit is contained in:
@@ -95,7 +95,7 @@ export interface CliArgs {
|
||||
rawOutput: boolean | undefined;
|
||||
acceptRawOutputRisk: boolean | undefined;
|
||||
isCommand: boolean | undefined;
|
||||
profile: string | undefined;
|
||||
profiles: string | undefined;
|
||||
}
|
||||
|
||||
export async function parseArguments(
|
||||
@@ -109,8 +109,8 @@ export async function parseArguments(
|
||||
.usage(
|
||||
'Usage: gemini [options] [command]\n\nGemini CLI - Defaults to interactive mode. Use -p/--prompt for non-interactive (headless) mode.',
|
||||
)
|
||||
.option('profile', {
|
||||
alias: ['profiles', 'P'],
|
||||
.option('profiles', {
|
||||
alias: ['profile', 'P'],
|
||||
type: 'string',
|
||||
nargs: 1,
|
||||
global: true,
|
||||
@@ -435,7 +435,7 @@ export async function loadCliConfig(
|
||||
const loadedSettings = loadSettings(cwd);
|
||||
const profileManager = new ProfileManager(loadedSettings);
|
||||
const activeProfileName =
|
||||
argv.profile || profileManager.getActiveProfileName();
|
||||
argv.profiles || profileManager.getActiveProfileName();
|
||||
const profile = activeProfileName
|
||||
? await profileManager.getProfile(activeProfileName)
|
||||
: null;
|
||||
|
||||
@@ -498,7 +498,7 @@ describe('gemini.tsx main function kitty protocol', () => {
|
||||
rawOutput: undefined,
|
||||
acceptRawOutputRisk: undefined,
|
||||
isCommand: undefined,
|
||||
profile: undefined,
|
||||
profiles: undefined,
|
||||
});
|
||||
|
||||
await act(async () => {
|
||||
|
||||
Reference in New Issue
Block a user