Skip to content

v1.6.6 - Fix Config Wizard YAML Escaping

Choose a tag to compare

@jwesleye jwesleye released this 31 Dec 16:37
· 91 commits to main since this release

v1.6.6 - Fix Config Wizard YAML Escaping

This patch release fixes the remaining YAML parsing error when using the configuration wizard.

Bug Fixed

  • Config wizard YAML escaping: Fixed #x001b error when using --wizard or loading wizard-generated configs
    • Root cause: Config wizard was writing ANSI escape codes directly to YAML without proper escaping
    • Symptom: unacceptable character #x001b error when loading .chatrc files created by the wizard
    • Related: This completes the fix started in v1.6.3, which only fixed the default config template

Technical Details

The wizard's _generate_yaml_with_comments() method was writing color values like:

dim: \033[2m    # Wrong - actual ESC character

Now properly escapes them as:

dim: '\\033[2m'  # Correct - will be decoded properly

What Was Fixed

  • Wizard now detects ANSI codes containing \033
  • Properly escapes backslashes: \ becomes \\\\
  • Wraps escaped values in quotes for YAML safety
  • YAML parses correctly, decode step converts to ESC character

Testing

  • All 318 tests passing
  • Clean linting and type checking
  • Verified YAML parsing works correctly

Recommendation

If you've experienced #x001b errors when using --wizard or loading configs, upgrade immediately:

pip install --upgrade basic-agent-chat-loop

Then either run --wizard again or --reset-config to regenerate your config file.