MCPcopy Index your code
hub / github.com/github/awesome-copilot / clampSteps

Function clampSteps

extensions/java-modernization-studio/server.mjs:79–83  ·  view source on GitHub ↗

Clamp a requested step budget into a sane range.

(n)

Source from the content-addressed store, hash-verified

77
78/** Clamp a requested step budget into a sane range. */
79function clampSteps(n) {
80 const v = Number(n);
81 if (!Number.isFinite(v)) return AUTOPILOT_MAX_STEPS;
82 return Math.max(1, Math.min(50, Math.round(v)));
83}
84
85/**
86 * Kick off an Autopilot run for this instance. Returns immediately; the run loop

Callers 1

startAutopilotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected