MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / clamp01

Function clamp01

apps/extension/src/shared/context-usage.ts:7–7  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

5export const AUTO_COMPACT_RATIO = 0.85;
6
7const clamp01 = (value: number): number => Math.min(1, Math.max(0, value));
8
9export const getContextRatio = (
10 promptTokens: number,

Callers 2

getContextRatioFunction · 0.70
formatContextSummaryFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected