mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-30 19:09:28 +00:00
Select-all + Delete cleared the composer; select-all + Cut left it holding a draft. Both produce identical DOM, so the split was in the reader. An emptied editor keeps a placeholder <br> \u2014 scaffolding normalizeComposerEditorDom adds so the contenteditable doesn't collapse to a sliver, not a line the user typed. composerPlainText read it as "\n", and syncDraftFromEditor (session swap, pagehide) skipped the normalize+sanitize its rAF twin runs. Cut's residue reached that reader; Delete's went through the flush path and got cleaned. Fixed where the two disagree rather than at each call site: an editor holding nothing but its placeholder break reads as empty. A real Shift+Enter break, a trailing break after text, and a nested lone <br> are all unchanged \u2014 the exemption is scoped to the editor root by its slot marker. syncDraftFromEditor now normalizes and sanitizes like the flush path, so both readers see one truth. |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||