import React from "react" import { Box, Text } from "ink" import type { AccountInfo } from "../../upstream/codex/account-info" import type { LimitGroupView } from "../limits" import type { AccountView, ProviderInfo, ProviderMode } from "../types" import { AccountInfoPanel } from "./account-info-panel" import { CodexFastModeStatus } from "./codex-fast-mode" import { LimitsPanel } from "./limits-panel" import { WelcomePanel } from "./welcome-panel" export function ProviderDashboard(props: { hostname: string port: number contentWidth: number compact: boolean innerWidth: number providerMode: ProviderMode providerInfo: ProviderInfo account?: AccountView activeAccountInfo?: AccountInfo codexFastMode: boolean limitGroups: LimitGroupView[] limitsLoading: boolean limitsError?: string apiPassword?: string }) { const leftWidth = props.compact ? props.innerWidth : 42 const detailsWidth = props.compact ? props.innerWidth : Math.min(58, Math.max(42, props.contentWidth - 48)) return ( {props.compact ? ( {"─".repeat(props.innerWidth)} ) : ( )} {props.providerMode === "codex" && } ) }