MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / retryBackoffDelays

Function retryBackoffDelays

packages/agent-core/src/loop/retry.ts:100–108  ·  view source on GitHub ↗
(maxAttempts: number)

Source from the content-addressed store, hash-verified

98}
99
100export function retryBackoffDelays(maxAttempts: number): number[] {
101 return retry.timeouts({
102 retries: Math.max(maxAttempts - 1, 0),
103 minTimeout: RETRY_MIN_TIMEOUT_MS,
104 maxTimeout: RETRY_MAX_TIMEOUT_MS,
105 factor: RETRY_FACTOR,
106 randomize: true,
107 });
108}
109
110export async function sleepForRetry(delayMs: number, signal: AbortSignal): Promise<void> {
111 signal.throwIfAborted();

Callers 2

compactionRoundMethod · 0.90
chatWithRetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected