blob: 6722c0fda26b14a58e8b6c19f0e3892d2526a7a8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
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,
}) => (
<Box marginTop={1} display="flex" justifyContent="space-between" width="100%">
{/* Left Section: Help/DebugMode */}
<Box>
<Text color={Colors.SubtleComment}>
{queryLength === 0 ? '? for shortcuts' : ''}
{debugMode && (
<Text color="red"> {debugMessage || 'Running in debug mode.'}</Text>
)}
</Text>
</Box>
{/* Middle Section: Centered Sandbox Info */}
<Box
flexGrow={1}
alignItems="center"
justifyContent="center"
display="flex"
>
{process.env.SANDBOX ? (
<Text color="green"> {process.env.SANDBOX} </Text>
) : (
<Text color="red"> WARNING: OUTSIDE SANDBOX </Text>
)}
</Box>
{/* Right Section: Gemini Label */}
<Box>
<Text color={Colors.AccentBlue}> {config.getModel()} </Text>
</Box>
</Box>
);
|