env var to set default model, display model on lower right (#110)
This commit is contained in:
parent
79710375e3
commit
a7fba66832
|
@ -34,7 +34,7 @@ function parseArguments(): CliArgs {
|
||||||
alias: 'm',
|
alias: 'm',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
description: `The Gemini model to use. Defaults to ${DEFAULT_GEMINI_MODEL}.`,
|
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', {
|
.option('debug_mode', {
|
||||||
alias: 'z',
|
alias: 'z',
|
||||||
|
|
|
@ -145,6 +145,7 @@ export const App = ({ config, initialInput }: AppProps) => {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Footer
|
<Footer
|
||||||
|
config={config}
|
||||||
queryLength={query.length}
|
queryLength={query.length}
|
||||||
debugMode={config.getDebugMode()}
|
debugMode={config.getDebugMode()}
|
||||||
debugMessage={debugMessage}
|
debugMessage={debugMessage}
|
||||||
|
|
|
@ -7,14 +7,17 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box, Text } from 'ink';
|
import { Box, Text } from 'ink';
|
||||||
import { Colors } from '../colors.js';
|
import { Colors } from '../colors.js';
|
||||||
|
import { Config } from '@gemini-code/server';
|
||||||
|
|
||||||
interface FooterProps {
|
interface FooterProps {
|
||||||
|
config: Config;
|
||||||
queryLength: number;
|
queryLength: number;
|
||||||
debugMode: boolean;
|
debugMode: boolean;
|
||||||
debugMessage: string;
|
debugMessage: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Footer: React.FC<FooterProps> = ({
|
export const Footer: React.FC<FooterProps> = ({
|
||||||
|
config,
|
||||||
queryLength,
|
queryLength,
|
||||||
debugMode,
|
debugMode,
|
||||||
debugMessage,
|
debugMessage,
|
||||||
|
@ -46,7 +49,7 @@ export const Footer: React.FC<FooterProps> = ({
|
||||||
|
|
||||||
{/* Right Section: Gemini Label */}
|
{/* Right Section: Gemini Label */}
|
||||||
<Box>
|
<Box>
|
||||||
<Text color={Colors.AccentBlue}>Gemini</Text>
|
<Text color={Colors.AccentBlue}> {config.getModel()} </Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue