From 71605283ea538a0b54aafee2161db72746a99738 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 17 Feb 2026 10:47:06 +0100 Subject: [PATCH] Fix Assist to log sendPrompt errors instead of silently ignoring them --- cmd/Assist/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/Assist/main.go b/cmd/Assist/main.go index 05148b4..276f4cf 100644 --- a/cmd/Assist/main.go +++ b/cmd/Assist/main.go @@ -107,7 +107,11 @@ func main() { // In a 2-1 chord, the selection comes through as e.Arg if sessionIDRegex.MatchString(cmd) { if len(e.Arg) > 0 { - go sendPrompt(cmd, string(e.Arg)) + go func(id, prompt string) { + if err := sendPrompt(id, prompt); err != nil { + fmt.Fprintf(os.Stderr, "Failed to send prompt: %v\n", err) + } + }(cmd, string(e.Arg)) } continue } @@ -565,7 +569,9 @@ func handlePromptWindow(w *acme.Win, sess *SessionInfo) { } prompt := strings.TrimSpace(string(body)) if prompt != "" { - go sendPrompt(sess.ID, prompt) + if err := sendPrompt(sess.ID, prompt); err != nil { + fmt.Fprintf(os.Stderr, "Failed to send prompt: %v\n", err) + } w.Ctl("delete") return }