claude-code-best/src/components/agents/AgentNavigationFooter.tsx
2026-04-07 16:17:48 +08:00

24 lines
614 B
TypeScript

import * as React from 'react'
import { useExitOnCtrlCDWithKeybindings } from '../../hooks/useExitOnCtrlCDWithKeybindings.js'
import { Box, Text } from '@anthropic/ink'
type Props = {
instructions?: string
}
export function AgentNavigationFooter({
instructions = 'Press ↑↓ to navigate · Enter to select · Esc to go back',
}: Props): React.ReactNode {
const exitState = useExitOnCtrlCDWithKeybindings()
return (
<Box marginLeft={2}>
<Text dimColor>
{exitState.pending
? `Press ${exitState.keyName} again to exit`
: instructions}
</Text>
</Box>
)
}