({ model, usage, totalTokens }: ModelEntryProps)
| 674 | }; |
| 675 | |
| 676 | function ModelEntry({ model, usage, totalTokens }: ModelEntryProps): React.ReactNode { |
| 677 | const modelTokens = usage.inputTokens + usage.outputTokens; |
| 678 | const percentage = ((modelTokens / totalTokens) * 100).toFixed(1); |
| 679 | |
| 680 | return ( |
| 681 | <Box flexDirection="column"> |
| 682 | <Text> |
| 683 | {figures.bullet} <Text bold>{renderModelName(model)}</Text> <Text color="subtle">({percentage}%)</Text> |
| 684 | </Text> |
| 685 | <Text color="subtle"> |
| 686 | {' '}In: {formatNumber(usage.inputTokens)} · Out: {formatNumber(usage.outputTokens)} |
| 687 | </Text> |
| 688 | </Box> |
| 689 | ); |
| 690 | } |
| 691 | |
| 692 | type ChartLegend = { |
| 693 | model: string; |
nothing calls this directly
no test coverage detected