Granular Effort Slider
Replace the
/modeleffort picker with a 1-9 numeric slider.
ID granular-effort · Default on · Compatible * · Source
What it does
Swaps the four-step low / medium / high / max effort picker in /model for a 1-9 scale. Cycle with ← and →. Your exact chosen integer is what gets saved to settings.json and reloaded on the next launch — not a canonical low/medium/high mapping. The startup banner reads with 4/9 effort instead of with medium effort.
At the API boundary, the number is mapped to a conventional string so the upstream request still sees a valid effort level:
1-2 → low
3-5 → medium
6-7 → high
8-9 → max5 is the default. 1 is minimal. 9 is max.
Composes with persist-max-effort — both patches edit the same effort enums but use zero-width inserts that don't collide.
Usage
Run /model and cycle with the arrow keys. The number shown in the picker is what gets saved and read back.
How it works
Seven patch sites, each anchored by AST shape rather than minified names:
cycleEffortLevel— identified by containing aConditionalExpressionthat picks between two effort arrays (["low","medium","high","max"]vs["low","medium","high"]). The patch prepends an early-return prelude that ignores the original body and cycles 1..9 directly. Using an early return rather than a wholesale replacement avoids conflicting withpersist-max-effort, which inserts,"max"into the same arrays.ModelPickerdisplay text — found by locating the unique" effort"literal and walking to its parentcreateElementcall. The patch swaps thecapitalize(e), " effort", (e === default ? " (default)" : "")trio for a numeric expression +"/9"suffix.convertEffortValueToLevel— the picker-init helper that the public build collapses to"high"for any number. Found by a one-parameter function containing atypeof q === "string"check and two"high"return literals. An early return is prepended so numbers pass straight through.toPersistableEffort— identified by the uniqueq === "low" || q === "medium" || q === "high"logical chain. Prepend a numeric passthrough so raw integers get written tosettings.json.- Settings Zod schema — the
h.enum(["low","medium","high"])call is wrapped inh.union([ ..., h.number().int() ])so numeric values survive the schema's.catch(void 0)guard on read. - API effort assignment — the function containing the
"effort" in KBinaryExpression(unique in the bundle) gets a prepended number-to-string mapper so the request body always receives a valid enum value. getEffortSuffix— the" with ${...} effort"template literal whose expression is aconvertEffortValueToLevelcall (disambiguated from an unrelated template that wraps achalk.boldcall) is rewritten to render${n}/9instead of the string name.