Conversation
…File/label
Claude Code v2.1.243 added `modelPicker` and v2.1.247 added `tipsFile`,
`label` and object-form tip entries to `spinnerTipsOverride`. Neither is
described here yet, and the existing `spinnerTipsOverride` shape now
rejects valid configurations.
spinnerTipsOverride:
- add `tipsFile` (a path to a JSON file holding the same tip shapes) and
`label` (the prefix shown before custom tips, default "Tip")
- `tips` entries may now be either a plain string or
`{id, text, cooldownSessions?, priority?}`
- drop `required: ["tips"]` - the CLI marks `tips` optional, and a
`tipsFile`-only override is a valid and now-common configuration that
the current schema rejects
modelPicker: an ordered list of `{model, label?, description?}` rows for
the `/model` picker, plus `replaceBuiltInOptions`.
Field descriptions and constraints (the 500-character tip limit, the
`^[A-Za-z0-9._-]{1,64}$` id pattern, the settings tiers each key is read
from) are taken from the CLI's own schema descriptions.
Tests: three positive files covering a tipsFile-only override, object tip
entries, and a picker with alias/labelled/provider-format rows; two
negative files for a malformed tip id and a picker row missing `model`.
|
Thanks for the PR! This section of the codebase is owned by @domdomegg, @bogini, @sarahdeaton, and @ant-kurt - if they write a comment saying "LGTM" then it will be merged. |
|
I'm deliberately leaving Three bounds documented in settings-reference#spinnertipsoverride look like they're missing:
Two optional extras while you're in there:
Nothing blocking from my side — the |
|
Thanks for the careful review. Addressed in
Validation passed:
|
Claude Code ignores a spinnerTipsOverride.tipsFile that is not an absolute path, "~", or "~/"-prefixed, so encode those accepted forms (POSIX, home-relative, and Windows drive/backslash-rooted) as a pattern instead of accepting any string.
Claude Code v2.1.243 added
modelPicker, and v2.1.247 addedtipsFile,labeland object-form tip entries tospinnerTipsOverride. Neither is described here yet, and the currentspinnerTipsOverrideshape now rejects valid configurations.spinnerTipsOverridetipsFile— a path to a JSON file holding the same tip shapes, so the tip content can live outsidesettings.json. Constrained to the path forms the CLI accepts (absolute or~/~/-rooted; relative paths are ignored at runtime).label— the prefix shown before custom tips (default"Tip", effective limit 40 characters).tipsentries may now be a plain string or{id, text, cooldownSessions?, priority?}, with the numeric bounds the CLI applies (cooldownSessions0–1000,priority−10…10).required: ["tips"]. The CLI markstipsoptional, and atipsFile-only override is valid — that is the configuration the new setting exists to enable, and the current schema flags it as an error.modelPickerAn ordered list of
{model, label?, description?}rows for the/modelpicker, plusreplaceBuiltInOptions. Added next tomodelOverrides.Where the descriptions and constraints come from
Field descriptions, the 500-character tip limit, the
^[A-Za-z0-9._-]{1,64}$id pattern, the numeric bounds, and the notes about which settings tiers each key is read from are taken from the CLI's own schema descriptions and runtime normalization rather than paraphrased, so they should stay accurate against the tool.Two deliberate judgement calls, flagged so they are easy to overrule:
additionalProperties: false, matching the prevailing style in this file (spinnerVerbsand neighbours), even though the CLI itself is permissive there. Happy to relax it if you prefer to mirror the tool exactly.cooldownSessionsis typedinteger(a session count) whilepriorityisnumber, since the CLI accepts any finite number there and truncates it (Math.trunc+ clamp).Tests
Positive —
src/test/claude-code-settings/:spinner-tips-file.json— atipsFile-only override, which the current schema rejectsspinner-tips-file-windows.json— a Windows drive-rootedtipsFilepathspinner-tips-object-entries.json— mixed string and object tipsmodel-picker.json— alias, labelled, and provider-format (Bedrock) rowsNegative —
src/negative_test/claude-code-settings/:invalid-spinner-tip-entry.json— a tip id containing spacesinvalid-spinner-tip-cooldown.json—cooldownSessionsabove 1000invalid-spinner-tip-priority.json—priorityoutside −10…10invalid-spinner-tip-label.json— alabellonger than 40 charactersinvalid-spinner-tips-file-relative.json— a relativetipsFilepathinvalid-model-picker-row.json— a picker row missing the requiredmodelReview
Copilot's review round is addressed in 96f1dc6 and 01cced6: numeric bounds on
cooldownSessions/priority,maxLengthonlabel, and atipsFilepath pattern — each verified against the CLI's (2.1.251) runtime normalization before adopting. The tip object stays closed per the judgement call above.Verification
node ./cli.js check --schema-name=claude-code-settings.jsonpasses.npm run prettierreports no formatting differences repo-wide.node ./cli.js check-strict --schema-name=claude-code-settings.jsonreports the same single pre-existing error on this branch as onmaster(/$defs/hookCommand/anyOf/0/properties/typemissingtitle), so this change adds no new strict-metaschema failures. It is untouched here since it is unrelated.checkfail with "Schema validation succeeded ... but was supposed to fail", and restoring it makescheckpass again.