MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / parseMaxBudgetPerTask

Function parseMaxBudgetPerTask

frontend/src/utils/settings-utils.ts:24–33  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

22 * @returns The parsed number if valid (>= 1), null otherwise
23 */
24export const parseMaxBudgetPerTask = (value: string): number | null => {
25 if (!value) {
26 return null;
27 }
28
29 const parsedValue = parseFloat(value);
30 return parsedValue && parsedValue >= 1 && Number.isFinite(parsedValue)
31 ? parsedValue
32 : null;
33};
34
35export const extractSettings = (
36 formData: FormData,

Callers 3

formActionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected