mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
Adiciona dashboard TUI com 7 abas (Overview, Combos, Providers, Keys, Logs, Health, Cost) via Ink, 13 componentes reutilizáveis em tui-components/, menu interativo ao iniciar sem subcomando, e flag --tui no comando dashboard.
19 lines
541 B
JavaScript
19 lines
541 B
JavaScript
import React from "react";
|
|
import { Box, Text } from "ink";
|
|
|
|
export function TokenCounter({ tokensIn = 0, tokensOut = 0, costUsd = 0, model }) {
|
|
return (
|
|
<Box flexDirection="column">
|
|
<Box>
|
|
<Text bold>In: </Text>
|
|
<Text>{tokensIn.toLocaleString()}</Text>
|
|
<Text bold> Out: </Text>
|
|
<Text>{tokensOut.toLocaleString()}</Text>
|
|
<Text bold> Cost: </Text>
|
|
<Text color="yellow">${costUsd.toFixed(4)}</Text>
|
|
</Box>
|
|
{model && <Text dimColor>Model: {model}</Text>}
|
|
</Box>
|
|
);
|
|
}
|