pause autonomy during active user chats and expose waiting/retry telemetry

This commit is contained in:
DBT
2026-02-24 01:51:55 +00:00
parent 1328c1feec
commit af9ccbaae3
4 changed files with 51 additions and 9 deletions

View File

@@ -130,7 +130,7 @@ func statusCmd() {
}
}
if summary, nextRetry, dedupeHits, err := collectAutonomyTaskSummary(filepath.Join(workspace, "memory", "tasks.json")); err == nil {
fmt.Printf("Autonomy Tasks: todo=%d doing=%d blocked=%d done=%d dedupe_hits=%d\n", summary["todo"], summary["doing"], summary["blocked"], summary["done"], dedupeHits)
fmt.Printf("Autonomy Tasks: todo=%d doing=%d waiting=%d blocked=%d done=%d dedupe_hits=%d\n", summary["todo"], summary["doing"], summary["waiting"], summary["blocked"], summary["done"], dedupeHits)
if nextRetry != "" {
fmt.Printf("Autonomy Next Retry: %s\n", nextRetry)
}
@@ -252,7 +252,7 @@ func collectAutonomyTaskSummary(path string) (map[string]int, string, int, error
data, err := os.ReadFile(path)
if err != nil {
if os.IsNotExist(err) {
return map[string]int{"todo": 0, "doing": 0, "blocked": 0, "done": 0}, "", 0, nil
return map[string]int{"todo": 0, "doing": 0, "waiting": 0, "blocked": 0, "done": 0}, "", 0, nil
}
return nil, "", 0, err
}
@@ -264,7 +264,7 @@ func collectAutonomyTaskSummary(path string) (map[string]int, string, int, error
if err := json.Unmarshal(data, &items); err != nil {
return nil, "", 0, err
}
summary := map[string]int{"todo": 0, "doing": 0, "blocked": 0, "done": 0}
summary := map[string]int{"todo": 0, "doing": 0, "waiting": 0, "blocked": 0, "done": 0}
nextRetry := ""
nextRetryAt := time.Time{}
totalDedupe := 0