mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-28 05:12:26 +00:00
A [system_prompt] prefix set in config.toml was silently ignored: (1) load_config()'s section allowlist dropped the [system_prompt], [memory_files], [compression], and [skills] blocks entirely; (2) SystemPromptConfig had no prefix field; (3) the builder never prepended one. Add the four blocks to the allowlist, add prefix: str = "" to SystemPromptConfig, and prepend a "prefix" PromptSection at the front of SystemPromptBuilder's frozen sections so it leads build() output and is exposed via sections() (#457). Empty prefix emits no section — existing configs are byte-for-byte unchanged. Rebuilt on top of #457 (which refactored the builder to PromptSection objects); the original #452 by @SoulSniper-V2 patched the pre-#457 method. Credit to @SoulSniper-V2. Adds the regression tests the original PR lacked: config parse + prefix-prepended + empty-prefix-unchanged. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>