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/custom_exec_more_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/hexaiaction/custom_exec_more_test.go') diff --git a/internal/hexaiaction/custom_exec_more_test.go b/internal/hexaiaction/custom_exec_more_test.go index de45d26..28bbb97 100644 --- a/internal/hexaiaction/custom_exec_more_test.go +++ b/internal/hexaiaction/custom_exec_more_test.go @@ -18,13 +18,13 @@ func (c *capDoer) Chat(_ context.Context, msgs []llm.Message, _ ...llm.RequestOp } func (*capDoer) DefaultModel() string { return "m" } -func TestExecuteAction_Custom_ClearsSelection(t *testing.T) { +func TestExecuteAction_Custom_DoesNotMutateProvidedSelection(t *testing.T) { cfg := appconfig.Load(nil) parts := InputParts{Selection: "code"} - selectedCustom = &appconfig.CustomAction{ID: "x", Title: "X", Instruction: "Do it"} - _, _ = executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK"}, nil) - if selectedCustom != nil { - t.Fatalf("expected selectedCustom cleared after execution") + selectedCustom := &appconfig.CustomAction{ID: "x", Title: "X", Instruction: "Do it"} + _, _ = executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK"}, nil, selectedCustom) + if selectedCustom == nil { + t.Fatalf("expected provided selectedCustom to remain local state") } } -- cgit v1.2.3