[PR #9704] fix(opencode): skip ignored messages in undo/redo commands #13203

Open
opened 2026-02-16 18:18:04 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9704

State: open
Merged: No


Fixes /undo and /redo commands restoring to "ignored" messages when they should only restore to real user messages.

Ignored messages have ignored: true on their text parts and are meant for UI display only - they were never part of the actual conversation with the model.

Updates message filtering to check that the message has at least one text part that is neither synthetic nor ignored. Also fixes prompt restoration to exclude ignored parts.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9704 **State:** open **Merged:** No --- Fixes `/undo` and `/redo` commands restoring to "ignored" messages when they should only restore to real user messages. Ignored messages have `ignored: true` on their text parts and are meant for UI display only - they were never part of the actual conversation with the model. Updates message filtering to check that the message has at least one text part that is neither `synthetic` nor `ignored`. Also fixes prompt restoration to exclude ignored parts.
yindo added the pull-request label 2026-02-16 18:18:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13203