One file, key = value, comments with '#'. /splinter/config (or ~/.config/splinter/config), overridable with SPLINTER_CONFIG or --config, ignorable with --no-config, generatable with --init-config. Precedence is command line, then file, then built-in default, and an unknown key is an error with its line number - a typo that is silently ignored is a config that lies about what it does. The example file is written and read back by the test suite, so it cannot rot into something the parser rejects. What it covers: endpoint, model, api_key_env, transport, cli_cmd, plugin (repeatable), theme, autonomous, steps, max_bytes, session_dir, system_prompt. Verified from /tmp with nothing but the word 'splinter': the chat started, the sidebar showed the configured endpoint, theme, cps and clock widgets, and a turn against kontron answered 'Ich bin ein grosses Sprachmodell...' with the session written to /home/lotherk/.splinter. Thirteen test binaries green (test_config: full file, trimming, unknown key with line number, missing '=', missing file, example round-trip, env path).
71 KiB
Executable File
71 KiB
Executable File