diff --git a/e2e/console/agent_run_test.go b/e2e/console/agent_run_test.go index 8ac911b86..50a93ff4e 100644 --- a/e2e/console/agent_run_test.go +++ b/e2e/console/agent_run_test.go @@ -366,7 +366,7 @@ func TestAgentRun_Get(t *testing.T) { createdAt updatedAt organization { id } - permission(action: "agentrun:agent-run:get") + permission(action: "agent:run:get") } } } diff --git a/pkg/agent/approval.go b/pkg/agent/approval.go index 396cc7205..43c6fba83 100644 --- a/pkg/agent/approval.go +++ b/pkg/agent/approval.go @@ -19,6 +19,7 @@ import ( "encoding/json" "errors" "fmt" + "maps" "go.probo.inc/probo/pkg/llm" ) @@ -79,9 +80,7 @@ func MergeApprovalDecisions( if cp.ApprovalInput == nil { cp.ApprovalInput = make(map[string]ApprovalResult, len(decisions)) } - for id, decision := range decisions { - cp.ApprovalInput[id] = decision - } + maps.Copy(cp.ApprovalInput, decisions) data, err := json.Marshal(&cp) if err != nil {