From 9c72a3ae129a5ab6cbc13fded86da01f2a354a75 Mon Sep 17 00:00:00 2001 From: Olcan Date: Mon, 19 May 2025 16:58:57 -0700 Subject: ui tweaks (#442) --- packages/cli/src/ui/App.tsx | 19 ++++++++++--------- packages/cli/src/ui/components/Footer.tsx | 17 +++++------------ packages/cli/src/ui/components/InputPrompt.tsx | 2 +- 3 files changed, 16 insertions(+), 22 deletions(-) (limited to 'packages/cli/src') diff --git a/packages/cli/src/ui/App.tsx b/packages/cli/src/ui/App.tsx index befefec1..c07c623e 100644 --- a/packages/cli/src/ui/App.tsx +++ b/packages/cli/src/ui/App.tsx @@ -20,7 +20,7 @@ import { ShellModeIndicator } from './components/ShellModeIndicator.js'; import { EditorState, InputPrompt } from './components/InputPrompt.js'; import { Footer } from './components/Footer.js'; import { ThemeDialog } from './components/ThemeDialog.js'; -import { shortenPath, type Config } from '@gemini-code/server'; +import { type Config } from '@gemini-code/server'; import { Colors } from './colors.js'; import { Help } from './components/Help.js'; import { loadHierarchicalGeminiMemory } from '../config/config.js'; @@ -342,14 +342,16 @@ export const App = ({ justifyContent="space-between" width="100%" > - - <> - cwd: - - {shortenPath(config.getTargetDir(), 70)} + {geminiMdFileCount > 0 && ( + + {process.env.GEMINI_SYSTEM_MD && ( + |⌐■_■| + )} + + Using {geminiMdFileCount} GEMINI.md files - - + + )} {showAutoAcceptIndicator && !shellModeActive && ( @@ -431,7 +433,6 @@ export const App = ({ debugMode={config.getDebugMode()} debugMessage={debugMessage} cliVersion={cliVersion} - geminiMdFileCount={geminiMdFileCount} corgiMode={corgiMode} /> diff --git a/packages/cli/src/ui/components/Footer.tsx b/packages/cli/src/ui/components/Footer.tsx index 0e2779cb..03e85db1 100644 --- a/packages/cli/src/ui/components/Footer.tsx +++ b/packages/cli/src/ui/components/Footer.tsx @@ -7,14 +7,13 @@ import React from 'react'; import { Box, Text } from 'ink'; import { Colors } from '../colors.js'; -import { Config } from '@gemini-code/server'; +import { shortenPath, tildeifyPath, Config } from '@gemini-code/server'; interface FooterProps { config: Config; debugMode: boolean; debugMessage: string; cliVersion: string; - geminiMdFileCount: number; corgiMode: boolean; } @@ -23,19 +22,16 @@ export const Footer: React.FC = ({ debugMode, debugMessage, cliVersion, - geminiMdFileCount, corgiMode, }) => ( - {geminiMdFileCount > 0 && ( - - Using {geminiMdFileCount} GEMINI.md files - - )} + + {shortenPath(tildeifyPath(config.getTargetDir()), 70)} + {debugMode && ( - {debugMessage || ' | Running in debug mode.'} + {' ' + (debugMessage || '--debug')} )} @@ -74,9 +70,6 @@ export const Footer: React.FC = ({ )} - {process.env.GEMINI_SYSTEM_MD && ( - |⌐■_■| - )} ); diff --git a/packages/cli/src/ui/components/InputPrompt.tsx b/packages/cli/src/ui/components/InputPrompt.tsx index c9ebaf14..f77ac4d6 100644 --- a/packages/cli/src/ui/components/InputPrompt.tsx +++ b/packages/cli/src/ui/components/InputPrompt.tsx @@ -216,7 +216,7 @@ export const InputPrompt: React.FC = ({ initialCursorOffset={editorState.initialCursorOffset} initialText={query} onChange={onChange} - placeholder="Enter your message or use tools (e.g., @src/file.txt)..." + placeholder="Type your message or @path/to/file" /* Account for width used by the box and > */ navigateUp={inputHistory.navigateUp} navigateDown={inputHistory.navigateDown} -- cgit v1.2.3