diff options
| author | Shreya Keshive <[email protected]> | 2025-07-18 18:14:46 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-18 22:14:46 +0000 |
| commit | 73745ecd0323882fc951e387250fe2efef374e81 (patch) | |
| tree | ab899051fb0d900d34a71c974410b466ff652bb8 /packages/cli/src/ui/components/Footer.tsx | |
| parent | 4915050ad47236a6d8349ed87b68cd202f96efbe (diff) | |
Display open IDE file in context section above input box rather than in the footer (#4470)
Diffstat (limited to 'packages/cli/src/ui/components/Footer.tsx')
| -rw-r--r-- | packages/cli/src/ui/components/Footer.tsx | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index 5524114b..95904cd9 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -4,16 +4,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -import React, { useEffect, useState } from 'react'; +import React from 'react'; import { Box, Text } from 'ink'; import { Colors } from '../colors.js'; -import { - shortenPath, - tildeifyPath, - tokenLimit, - ideContext, - ActiveFile, -} from '@google/gemini-cli-core'; +import { shortenPath, tildeifyPath, tokenLimit } from '@google/gemini-cli-core'; import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js'; import process from 'node:process'; import Gradient from 'ink-gradient'; @@ -49,24 +43,6 @@ export const Footer: React.FC<FooterProps> = ({ const limit = tokenLimit(model); const percentage = promptTokenCount / limit; - const [activeFile, setActiveFile] = useState<ActiveFile | undefined>( - undefined, - ); - - useEffect(() => { - const updateActiveFile = () => { - const currentActiveFile = ideContext.getActiveFileContext(); - setActiveFile(currentActiveFile); - }; - - updateActiveFile(); - - const unsubscribe = ideContext.subscribeToActiveFile(setActiveFile); - return () => { - unsubscribe(); - }; - }, []); - return ( <Box marginTop={1} justifyContent="space-between" width="100%"> <Box> @@ -83,19 +59,6 @@ export const Footer: React.FC<FooterProps> = ({ {branchName && <Text color={Colors.Gray}> ({branchName}*)</Text>} </Text> )} - {activeFile && activeFile.filePath && ( - <Text> - <Text color={Colors.Gray}> | </Text> - <Text color={Colors.LightBlue}> - {shortenPath(tildeifyPath(activeFile.filePath), 70)} - </Text> - {activeFile.cursor && ( - <Text color={Colors.Gray}> - :{activeFile.cursor.line}:{activeFile.cursor.character} - </Text> - )} - </Text> - )} {debugMode && ( <Text color={Colors.AccentRed}> {' ' + (debugMessage || '--debug')} |
