Skip to content

fix: improve response parsing robustness for cheaper models#4

Merged
haapjari merged 1 commit intomainfrom
improve-default-prompt-and-parsing
Jan 3, 2026
Merged

fix: improve response parsing robustness for cheaper models#4
haapjari merged 1 commit intomainfrom
improve-default-prompt-and-parsing

Conversation

@haapjari
Copy link
Owner

@haapjari haapjari commented Jan 3, 2026

Summary

  • Parsing now scans for REPLACE header instead of requiring it on line 1
  • Handles preamble text, case variations, and extra whitespace from cheaper models
  • Improved default prompt with explicit format examples and verification checklist
  • Added 35 unit tests for parsing edge cases

Changes

  • lua/inline/init.lua: Robust parse_response with preamble tolerance
  • prompts/default.md: Clearer format spec with negative examples
  • tests/parsing_spec.lua: Comprehensive parsing test coverage

- parse_response now scans for REPLACE header instead of requiring it on line 1
- handle preamble text, case variations, and extra whitespace
- improve default prompt with explicit format examples and verification checklist
- add 35 unit tests for parsing edge cases
Copy link
Owner Author

haapjari commented Jan 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@haapjari haapjari merged commit 23e6241 into main Jan 3, 2026
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