MCPcopy Create free account
hub / github.com/arctic-cli/interface / renderProgressBar

Function renderProgressBar

packages/arctic/src/session/usage-format.ts:151–156  ·  view source on GitHub ↗
(percentRemaining: number)

Source from the content-addressed store, hash-verified

149}
150
151function renderProgressBar(percentRemaining: number): string {
152 const ratio = Math.max(0, Math.min(100, percentRemaining)) / 100
153 const filled = Math.round(ratio * BAR_SEGMENTS)
154 const empty = BAR_SEGMENTS - filled
155 return `[${BAR_FILLED.repeat(filled)}${BAR_EMPTY.repeat(empty)}]`
156}
157
158function formatReset(resetsAtSeconds: number | undefined, now: number): string | undefined {
159 if (!resetsAtSeconds) return undefined

Callers 1

formatRemainingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected