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

Function cap

packages/opencode/src/session/retry.ts:31–33  ·  view source on GitHub ↗
(ms: number)

Source from the content-addressed store, hash-verified

29export const RETRY_MAX_DELAY = 2_147_483_647 // max 32-bit signed integer for setTimeout
30
31function cap(ms: number) {
32 return Math.min(ms, RETRY_MAX_DELAY)
33}
34
35export function delay(attempt: number, error?: SessionV1.APIError) {
36 if (error) {

Callers 1

delayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected