From 2ee988ccc04c09ceb6de7cdb75c94114e85d01b9 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sat, 14 Mar 2026 00:39:22 +0000 Subject: feat: add agent selector to UI and support direct agent assignment - Added an agent selector (Auto, Claude, Gemini) to the Start Next Task button. - Updated the backend to pass query parameters as environment variables to scripts. - Modified the executor pool to skip classification when a specific agent is requested. - Added --agent flag to claudomator start command. - Updated tests to cover the new functionality. --- internal/api/scripts.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/api/scripts.go') diff --git a/internal/api/scripts.go b/internal/api/scripts.go index 822bd32..8db937b 100644 --- a/internal/api/scripts.go +++ b/internal/api/scripts.go @@ -4,7 +4,9 @@ import ( "bytes" "context" "net/http" + "os" "os/exec" + "strings" "time" ) @@ -33,6 +35,12 @@ func (s *Server) handleScript(w http.ResponseWriter, r *http.Request) { defer cancel() cmd := exec.CommandContext(ctx, scriptPath) + cmd.Env = os.Environ() + for k, v := range r.URL.Query() { + if len(v) > 0 { + cmd.Env = append(cmd.Env, "CLAUDOMATOR_"+strings.ToUpper(k)+"="+v[0]) + } + } var stdout, stderr bytes.Buffer cmd.Stdout = &stdout -- cgit v1.2.3