Download packages/cli/src/ui/components/SessionBrowser/SessionBrowserNav.tsx from SaylorTwift/gemini-cli: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/components/SessionBrowser/SessionBrowserNav.tsx
- Command line
-
hf download hf://SaylorTwift/gemini-cli/packages/cli/src/ui/components/SessionBrowser/SessionBrowserNav.tsx
-
curl -L -o SessionBrowserNav.tsx https://huggingface.co/SaylorTwift/gemini-cli/resolve/main/packages/cli/src/ui/components/SessionBrowser/SessionBrowserNav.tsx
1.76 kB
| /** | |
| * @license | |
| * Copyright 2026 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import type React from 'react'; | |
| import { Box, Text } from 'ink'; | |
| import { Colors } from '../../colors.js'; | |
| import type { SessionBrowserState } from '../SessionBrowser.js'; | |
| const Kbd = ({ name, shortcut }: { name: string; shortcut: string }) => ( | |
| <> | |
| {name}: <Text bold>{shortcut}</Text> | |
| </> | |
| ); | |
| /** | |
| * Navigation help component showing keyboard shortcuts. | |
| */ | |
| export const NavigationHelpDisplay = (): React.JSX.Element => ( | |
| <Box flexDirection="column"> | |
| <Text color={Colors.Gray}> | |
| <Kbd name="Navigate" shortcut="↑/↓" /> | |
| {' '} | |
| <Kbd name="Resume" shortcut="Enter" /> | |
| {' '} | |
| <Kbd name="Search" shortcut="/" /> | |
| {' '} | |
| <Kbd name="Delete" shortcut="x" /> | |
| {' '} | |
| <Kbd name="Quit" shortcut="q" /> | |
| </Text> | |
| <Text color={Colors.Gray}> | |
| <Kbd name="Sort" shortcut="s" /> | |
| {' '} | |
| <Kbd name="Reverse" shortcut="r" /> | |
| {' '} | |
| <Kbd name="First/Last" shortcut="g/G" /> | |
| </Text> | |
| </Box> | |
| ); | |
| /** | |
| * Search input display component. | |
| */ | |
| export const SearchModeDisplay = ({ | |
| state, | |
| }: { | |
| state: SessionBrowserState; | |
| }): React.JSX.Element => ( | |
| <Box marginTop={1}> | |
| <Text color={Colors.Gray}>Search: </Text> | |
| <Text color={Colors.AccentPurple}>{state.searchQuery}</Text> | |
| <Text color={Colors.Gray}> (Esc to cancel)</Text> | |
| </Box> | |
| ); | |
| /** | |
| * No results display component for empty search results. | |
| */ | |
| export const NoResultsDisplay = ({ | |
| state, | |
| }: { | |
| state: SessionBrowserState; | |
| }): React.JSX.Element => ( | |
| <Box marginTop={1}> | |
| <Text color={Colors.Gray} dimColor> | |
| No sessions found matching '{state.searchQuery}'. | |
| </Text> | |
| </Box> | |
| ); | |