MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getThresholdTier

Function getThresholdTier

cli/src/utils/usage-banner-state.ts:76–81  ·  view source on GitHub ↗

* Gets the threshold tier for a given balance. * Returns null if balance is above all thresholds.

(balance: number)

Source from the content-addressed store, hash-verified

74 * Returns null if balance is above all thresholds.
75 */
76function getThresholdTier(balance: number): number | null {
77 if (balance < LOW_CREDITS_THRESHOLD) return LOW_CREDITS_THRESHOLD
78 if (balance < MEDIUM_CREDITS_THRESHOLD) return MEDIUM_CREDITS_THRESHOLD
79 if (balance < HIGH_CREDITS_THRESHOLD) return HIGH_CREDITS_THRESHOLD
80 return null
81}
82
83export interface AutoShowDecision {
84 shouldShow: boolean

Callers 1

shouldAutoShowBannerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected