MCPcopy
hub / github.com/BuilderIO/agent-native / parseLimit

Function parseLimit

packages/core/src/progress/actions.ts:18–22  ·  view source on GitHub ↗
(value: unknown, fallback = 20)

Source from the content-addressed store, hash-verified

16} from "./registry.js";
17
18function parseLimit(value: unknown, fallback = 20): number {
19 const n = Number(value ?? fallback);
20 if (!Number.isFinite(n) || n <= 0) return fallback;
21 return Math.min(Math.floor(n), 200);
22}
23
24export function createProgressToolEntries(
25 getCurrentUser: () => string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected