From 01afa93dc9f5d26d1c0808f38551af53ca3109d3 Mon Sep 17 00:00:00 2001 From: Kujtim Hoxha Date: Mon, 14 Jul 2025 11:07:27 +0200 Subject: [PATCH] chore: fix panic on message send --- internal/tui/components/chat/editor/editor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/tui/components/chat/editor/editor.go b/internal/tui/components/chat/editor/editor.go index 2185715c813dbdcb288bddde0fe70d63046cf731..116260c9d35dbe0539f303745b9c3b19e202e92c 100644 --- a/internal/tui/components/chat/editor/editor.go +++ b/internal/tui/components/chat/editor/editor.go @@ -130,6 +130,9 @@ func (m *editorCmp) Init() tea.Cmd { } func (m *editorCmp) send() tea.Cmd { + if m.app.CoderAgent == nil { + return util.ReportError(fmt.Errorf("coder agent is not initialized")) + } if m.app.CoderAgent.IsSessionBusy(m.session.ID) { return util.ReportWarn("Agent is working, please wait...") }