mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 06:50:26 +00:00
wip: undo properly remove messages from UI
This commit is contained in:
parent
c24fbb4292
commit
9c9cbb3e81
25 changed files with 699 additions and 472 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue