/** * @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 { shortenPath, tildeifyPath } from '@gemini-cli/core'; import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js'; import process from 'node:process'; import { MemoryUsageDisplay } from './MemoryUsageDisplay.js'; interface FooterProps { model: string; targetDir: string; branchName?: string; debugMode: boolean; debugMessage: string; corgiMode: boolean; errorCount: number; showErrorDetails: boolean; showMemoryUsage?: boolean; } export const Footer: React.FC = ({ model, targetDir, branchName, debugMode, debugMessage, corgiMode, errorCount, showErrorDetails, showMemoryUsage, }) => ( {shortenPath(tildeifyPath(targetDir), 70)} {branchName && ({branchName}*)} {debugMode && ( {' ' + (debugMessage || '--debug')} )} {/* Middle Section: Centered Sandbox Info */} {process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec' ? ( {process.env.SANDBOX.replace(/^gemini-(?:cli-)?/, '')} ) : process.env.SANDBOX === 'sandbox-exec' ? ( sandbox-exec{' '} ({process.env.SEATBELT_PROFILE}) ) : ( no sandbox (see docs) )} {/* Right Section: Gemini Label and Console Summary */} {model} {corgiMode && ( | `) )} {!showErrorDetails && errorCount > 0 && ( | )} {showMemoryUsage && } );