import figures from 'figures'; import * as React from 'react'; import { Box, Text, StatusIcon } from '@anthropic/ink'; import type { ContextSuggestion } from '../utils/contextSuggestions.js'; import { formatTokens } from '../utils/format.js'; type Props = { suggestions: ContextSuggestion[]; }; export function ContextSuggestions({ suggestions }: Props): React.ReactNode { if (suggestions.length === 0) return null; return ( Suggestions {suggestions.map((suggestion, i) => ( {suggestion.title} {suggestion.savingsTokens ? ( {' '} {figures.arrowRight} save ~{formatTokens(suggestion.savingsTokens)} ) : null} {suggestion.detail} ))} ); }