mirror of
https://github.com/sdwolf4103/opencode-working-memory.git
synced 2026-07-17 12:56:42 +02:00
eff0d3784c
Root cause: Model was instructed to output <workspace_memory_candidates> XML tags in the user-visible compaction summary, causing purple/italic rendering when combined with --- delimiters in Markdown. Fixes: - compactionContextHeader(): Now instructs model to use HTML comment format <!-- workspace_memory_candidates ... --> which is hidden from users - extractCandidateBlock(): New function supports 3 formats: 1. HTML comment (preferred, hidden from user) 2. Markdown section (visible but clean) 3. Legacy XML (backward compatible) - Added "DO NOT use XML tags" and "DO NOT start with ---" instructions Tests: - Verify compaction context header uses HTML comment format - Test parser accepts all 3 formats (HTML comment, Markdown, legacy XML)