Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
5
export
const
AUTO_COMPACT_RATIO = 0.85;
6
7
const
clamp01 = (value: number): number => Math.min(1, Math.max(0, value));
8
9
export
const
getContextRatio = (
10
promptTokens: number,
Callers
2
getContextRatio
Function · 0.70
formatContextSummary
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected