From f80462176d1ad0daf20b05d6410074369148c245 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 2 Mar 2026 14:54:08 +0200 Subject: hexaiaction: replace global action state with Runner struct (task 406) --- internal/hexaiaction/run_more_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'internal/hexaiaction/run_more_test.go') diff --git a/internal/hexaiaction/run_more_test.go b/internal/hexaiaction/run_more_test.go index 57bd933..0e391ed 100644 --- a/internal/hexaiaction/run_more_test.go +++ b/internal/hexaiaction/run_more_test.go @@ -85,20 +85,16 @@ func TestHandleSimplifyActionPassesSelection(t *testing.T) { } } -func TestHandleCustomActionUsesSelectedCustom(t *testing.T) { +func TestHandleCustomActionUsesProvidedCustom(t *testing.T) { t.Setenv("HEXAI_TMUX_STATUS", "0") sel := appconfig.CustomAction{ID: "custom", Title: "Do", Instruction: "do it"} - selectedCustom = &sel parts := InputParts{Selection: "text"} client := &stubChatDoer{} cfg := appconfig.Load(nil) - if _, err := handleCustomAction(context.Background(), parts, cfg, client); err != nil { + if _, err := handleCustomAction(context.Background(), parts, cfg, client, &sel); err != nil { t.Fatalf("handleCustomAction: %v", err) } if client.calls != 1 { t.Fatalf("expected custom action to invoke chat, got %d calls", client.calls) } - if selectedCustom != nil { - t.Fatal("expected selectedCustom to be cleared") - } } -- cgit v1.2.3