mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-06-11 02:33:10 +08:00
The regenerated summary block embeds raw user-message text and was passed as the *replacement* argument to String.prototype.replace, where $-sequences ($&, $$, $`, $') are special. A user message containing $& re-injected the entire matched block (duplicating the summary markers) and $$ collapsed to $, silently corrupting the persisted session summary. buildSummarySection only escapes newlines and backticks, not $. Fix: use function replacers (() => summaryBlock) at both rewrite sites so the replacement text is treated literally. Adds an end-to-end regression test. Co-authored-by: bymle <229636660+bymle@users.noreply.github.com>
3.8 KiB
3.8 KiB