diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-14 00:39:22 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-14 00:39:22 +0000 |
| commit | 2ee988ccc04c09ceb6de7cdb75c94114e85d01b9 (patch) | |
| tree | 29100e3e4b33748c544b9a42cb74e964df49b96e /internal/api/scripts.go | |
| parent | 98ccde12b08ad0b7f53e42de959a72d8382179e3 (diff) | |
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.
Diffstat (limited to 'internal/api/scripts.go')
| -rw-r--r-- | internal/api/scripts.go | 8 |
1 files changed, 8 insertions, 0 deletions
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 |
