@@ -46,14 +46,35 @@ import {
4646} from "./shared.js" ;
4747
4848type ProviderUsageRuntime = typeof import ( "../../infra/provider-usage.js" ) ;
49+ type ProgressRuntime = typeof import ( "../../cli/progress.js" ) ;
50+ type TerminalTableRuntime = typeof import ( "../../terminal/table.js" ) ;
51+ type ListProbeRuntime = typeof import ( "./list.probe.js" ) ;
4952
5053let providerUsageRuntimePromise : Promise < ProviderUsageRuntime > | undefined ;
54+ let progressRuntimePromise : Promise < ProgressRuntime > | undefined ;
55+ let terminalTableRuntimePromise : Promise < TerminalTableRuntime > | undefined ;
56+ let listProbeRuntimePromise : Promise < ListProbeRuntime > | undefined ;
5157
5258function loadProviderUsageRuntime ( ) : Promise < ProviderUsageRuntime > {
5359 providerUsageRuntimePromise ??= import ( "../../infra/provider-usage.js" ) ;
5460 return providerUsageRuntimePromise ;
5561}
5662
63+ function loadProgressRuntime ( ) : Promise < ProgressRuntime > {
64+ progressRuntimePromise ??= import ( "../../cli/progress.js" ) ;
65+ return progressRuntimePromise ;
66+ }
67+
68+ function loadTerminalTableRuntime ( ) : Promise < TerminalTableRuntime > {
69+ terminalTableRuntimePromise ??= import ( "../../terminal/table.js" ) ;
70+ return terminalTableRuntimePromise ;
71+ }
72+
73+ function loadListProbeRuntime ( ) : Promise < ListProbeRuntime > {
74+ listProbeRuntimePromise ??= import ( "./list.probe.js" ) ;
75+ return listProbeRuntimePromise ;
76+ }
77+
5778export async function modelsStatusCommand (
5879 opts : {
5980 json ?: boolean ;
@@ -220,8 +241,8 @@ export async function modelsStatusCommand(
220241 let probeSummary : AuthProbeSummary | undefined ;
221242 if ( opts . probe ) {
222243 const [ { withProgressTotals } , { runAuthProbes } ] = await Promise . all ( [
223- import ( "../../cli/progress.js" ) ,
224- import ( "./list.probe.js" ) ,
244+ loadProgressRuntime ( ) ,
245+ loadListProbeRuntime ( ) ,
225246 ] ) ;
226247 probeSummary = await withProgressTotals (
227248 { label : "Probing auth profiles…" , total : 1 } ,
@@ -613,7 +634,7 @@ export async function modelsStatusCommand(
613634 const [
614635 { getTerminalTableWidth, renderTable } ,
615636 { describeProbeSummary, formatProbeLatency, sortProbeResults } ,
616- ] = await Promise . all ( [ import ( "../../terminal/table.js" ) , import ( "./list.probe.js" ) ] ) ;
637+ ] = await Promise . all ( [ loadTerminalTableRuntime ( ) , loadListProbeRuntime ( ) ] ) ;
617638 runtime . log ( "" ) ;
618639 runtime . log ( colorize ( rich , theme . heading , "Auth probes" ) ) ;
619640 if ( probeSummary . results . length === 0 ) {
0 commit comments