env var to set default model, display model on lower right (#110)

This commit is contained in:
Olcan 2025-04-21 23:25:10 -07:00 committed by GitHub
parent 79710375e3
commit a7fba66832
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,7 @@ function parseArguments(): CliArgs {
alias: 'm',
type: 'string',
description: `The Gemini model to use. Defaults to ${DEFAULT_GEMINI_MODEL}.`,
default: DEFAULT_GEMINI_MODEL,
default: process.env.GEMINI_CODE_MODEL || DEFAULT_GEMINI_MODEL,
})
.option('debug_mode', {
alias: 'z',

View File

@ -145,6 +145,7 @@ export const App = ({ config, initialInput }: AppProps) => {
)}
<Footer
config={config}
queryLength={query.length}
debugMode={config.getDebugMode()}
debugMessage={debugMessage}

View File

@ -7,14 +7,17 @@
import React from 'react';
import { Box, Text } from 'ink';
import { Colors } from '../colors.js';
import { Config } from '@gemini-code/server';
interface FooterProps {
config: Config;
queryLength: number;
debugMode: boolean;
debugMessage: string;
}
export const Footer: React.FC<FooterProps> = ({
config,
queryLength,
debugMode,
debugMessage,
@ -46,7 +49,7 @@ export const Footer: React.FC<FooterProps> = ({
{/* Right Section: Gemini Label */}
<Box>
<Text color={Colors.AccentBlue}>Gemini</Text>
<Text color={Colors.AccentBlue}> {config.getModel()} </Text>
</Box>
</Box>
);