summaryrefslogtreecommitdiff
path: root/internal/cli
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-08 20:50:21 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-08 20:50:21 +0000
commit406247b14985ab57902e8e42898dc8cb8960290d (patch)
tree4a93be793f541038dd5d3fc154563051ba151b50 /internal/cli
parent0ff0bf75544bbf565288e61bb8e10c3f903830f8 (diff)
feat(executor): implement Gemini-based task classification and load balancing
- Add Classifier using gemini-2.0-flash-lite to automatically select agent/model. - Update Pool to track per-agent active tasks and rate limit status. - Enable classification for all tasks (top-level and subtasks). - Refine SystemStatus to be dynamic across all supported agents. - Add unit tests for the classifier and updated pool logic. - Minor UI improvements for project selection and 'Start Next' action.
Diffstat (limited to 'internal/cli')
-rw-r--r--internal/cli/run.go3
-rw-r--r--internal/cli/serve.go3
2 files changed, 6 insertions, 0 deletions
diff --git a/internal/cli/run.go b/internal/cli/run.go
index 3624cea..62e1252 100644
--- a/internal/cli/run.go
+++ b/internal/cli/run.go
@@ -86,6 +86,9 @@ func runTasks(file string, parallel int, dryRun bool) error {
},
}
pool := executor.NewPool(parallel, runners, store, logger)
+ if cfg.GeminiBinaryPath != "" {
+ pool.Classifier = &executor.Classifier{GeminiBinaryPath: cfg.GeminiBinaryPath}
+ }
// Handle graceful shutdown.
ctx, cancel := context.WithCancel(context.Background())
diff --git a/internal/cli/serve.go b/internal/cli/serve.go
index 2ecb6cd..b679b38 100644
--- a/internal/cli/serve.go
+++ b/internal/cli/serve.go
@@ -71,6 +71,9 @@ func serve(addr string) error {
}
pool := executor.NewPool(cfg.MaxConcurrent, runners, store, logger)
+ if cfg.GeminiBinaryPath != "" {
+ pool.Classifier = &executor.Classifier{GeminiBinaryPath: cfg.GeminiBinaryPath}
+ }
srv := api.NewServer(store, pool, logger, cfg.ClaudeBinaryPath, cfg.GeminiBinaryPath)
srv.StartHub()