Skip to content

Fix wizard: use multi-line TOML strings for system_prompt#464

Open
citadelgrad wants to merge 2 commits intoRightNow-AI:mainfrom
citadelgrad:fix/wizard-multiline-system-prompt
Open

Fix wizard: use multi-line TOML strings for system_prompt#464
citadelgrad wants to merge 2 commits intoRightNow-AI:mainfrom
citadelgrad:fix/wizard-multiline-system-prompt

Conversation

@citadelgrad
Copy link

Summary

  • Fix generateToml() in the dashboard spawn wizard to use TOML multi-line basic strings ("""...""") for system_prompt instead of single-line strings
  • This prevents "Invalid manifest format" errors when the system prompt contains newlines (e.g. multi-line persona prompts)
  • The spawnBuiltin() function already used multi-line strings correctly; this brings generateToml() in line

Fixes #463

Test plan

  • Added 5 Rust unit tests in openfang-types covering:
    • Multi-line system_prompt with newlines (brand guardian style)
    • Embedded double quotes in prompts
    • Markdown code blocks in prompts
    • Single-line backward compatibility
    • Full wizard output with custom profile + capabilities block
  • All tests pass: cargo test -p openfang-types

…rompt

The spawn wizard used single-line TOML strings for system_prompt, which
broke when the prompt contained newlines. Switch to multi-line basic
strings (triple-quoted) matching the pattern already used in
spawnBuiltin().

Fixes RightNow-AI#463
Tests cover the exact TOML format produced by the dashboard wizard's
generateToml() function: multi-line prompts, embedded quotes, code
blocks, single-line backward compat, and custom profile with
capabilities.
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.

Spawn wizard: multi-line system_prompt produces invalid TOML

1 participant