MCPcopy Create free account
hub / github.com/anomalyco/opencode / isTokenFresh

Function isTokenFresh

packages/opencode/src/account/account.ts:141–142  ·  view source on GitHub ↗
(tokenExpiry: number | null, now: number)

Source from the content-addressed store, hash-verified

139const eagerRefreshThresholdMs = Duration.toMillis(eagerRefreshThreshold)
140
141const isTokenFresh = (tokenExpiry: number | null, now: number) =>
142 tokenExpiry != null && tokenExpiry > now + eagerRefreshThresholdMs
143
144const mapAccountServiceError =
145 (message = "Account service operation failed") =>

Callers 1

account.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected