diff --git a/pkg/tui/tui.go b/pkg/tui/tui.go index bb5cb51..6fb3305 100644 --- a/pkg/tui/tui.go +++ b/pkg/tui/tui.go @@ -244,7 +244,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if last < 0 { panic("Unexpected empty messages handling msgResponseEnd") } - m.setMessageContents(last, strings.TrimSpace(m.messages[last].Content)) + m.setMessageContents(last, strings.TrimSpace(string(msg))) m.updateContent() m.status = "Press ctrl+s to send" case msgResponseError: