Allow bot assignment for subdirectories of project mount

This commit is contained in:
Levi Neely 2026-02-28 18:43:21 +01:00
parent 95efd907fb
commit 8a5d9e8518
1 changed files with 7 additions and 2 deletions

View File

@ -71,10 +71,15 @@ func (s *Supervisor) assignWork() {
}
botCwd := sess.Metadata().Cwd
// Find a claimable task in this bot's project (matching cwd)
// Find a claimable task in this bot's project (matching cwd or subdirectory)
for _, bead := range claimable {
taskCwd, ok := bead["cwd"].(string)
if !ok || taskCwd != botCwd {
if !ok {
continue
}
rel, err := filepath.Rel(taskCwd, botCwd)
if err != nil || (rel != "." && filepath.IsAbs(rel)) {
continue
}