wip: undo properly remove messages from UI

This commit is contained in:
Dax Raad
2025-07-28 22:58:12 -04:00
parent c24fbb4292
commit 9c9cbb3e81
25 changed files with 699 additions and 472 deletions

View File

@@ -190,6 +190,12 @@ func (m *messagesComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if msg.Properties.Part.SessionID == m.app.Session.ID {
cmds = append(cmds, m.renderView())
}
case opencode.EventListResponseEventMessagePartRemoved:
if msg.Properties.SessionID == m.app.Session.ID {
// Clear the cache when a part is removed to ensure proper re-rendering
m.cache.Clear()
cmds = append(cmds, m.renderView())
}
case renderCompleteMsg:
m.partCount = msg.partCount
m.lineCount = msg.lineCount