Skip to content

feat(settings): describe every setting as JSON for editors - #211

Merged
fuseraft merged 1 commit into
mainfrom
feat/settings-json
Nov 10, 2026
Merged

fuseraft merged 1 commit into
mainfrom
feat/settings-json

Conversation

@fuseraft

@fuseraft fuseraft commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Why

Clients like the VS Code extension had no machine-readable way to list fuseraft's global settings. Temperature, the memory and sub-agent models, chat limits, timeouts and the rest could only be changed with fuseraft settings set in a terminal. This adds what an editor needs; the extension's settings panel builds on it in fuseraft/fuseraft-vscode.

Changes

  • SettingsCatalog: one list of every settable key with its kind (text, bool, integer, number, choice, list), description, default, range, choices, whether "" clears it, and how to read it from the config. It replaces SettingsSetCommand's description-only key list.
  • fuseraft settings show --json lists every setting as a new Setting wire type.
  • fuseraft settings set <key> <value> --json prints the updated setting as item, or the CLI's error as an error envelope. Nothing is saved on an error.
  • Range and choice checks come from the catalog and run for every key, so what a client shows is what the CLI enforces. This adds the 0–2 sampling.temperature and 0–1 sampling.topP limits the help text already promised, and minimums of 1 for sampling.maxOutputTokens and repl.contextBudget.
  • provider.modelId can no longer be cleared, since an empty model ID never works.
  • fuseraft settings set with no key now lists the keys and exits 0, as its help said. It used to fail with a missing-argument error.
  • settings set's key listing now shows each key's type, range and default, taken from the catalog.

Testing

  • SettingsCatalogTests: every catalog key sets and reads back through settings set, every clearable key clears back to unset, defaults lie within their ranges, plus out-of-range, unknown-key, bad-choice and can't-clear cases.
  • SettingsJsonTests: the show and set envelopes, an error envelope that writes nothing, and the API key refusal.
  • The existing settings tests pass unchanged.
  • Drove the extension's new settings panel against this build in a real VS Code: edits, a rejected range, toggles, Reset, and an external settings set reloading the panel.

- Clients like the VS Code extension had no machine-readable way to list
  the global settings, so nothing outside a terminal could edit them
- SettingsCatalog holds each key's kind, range, choices, default and how to
  read it; settings show --json lists them, and settings set --json returns
  the updated setting or the CLI's error as an envelope
- The catalog's range and choice checks now run for every key, so what a
  client shows is what the CLI enforces; this adds the 0-2 temperature and
  0-1 topP limits the help text already promised
- provider.modelId can no longer be cleared, since an empty model ID never
  works
- settings set with no key now lists the keys and exits 0, as its help
  always said, instead of failing on a missing argument
@fuseraft
fuseraft merged commit 8867a55 into main Nov 10, 2026
9 checks passed
@fuseraft
fuseraft deleted the feat/settings-json branch November 10, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant