From 1456442d4eb65c6fb450132c40e04f8d70eaa633 Mon Sep 17 00:00:00 2001 From: Matt Low Date: Sun, 17 Mar 2024 22:51:55 +0000 Subject: [PATCH] tui: Fix response handling --- pkg/tui/tui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: