Make task state store-owned and signal its changes to the lead

This commit is contained in:
Ian Gulliver
2026-10-16 11:15:32 -07:00
parent 34db128afe
commit d26c81ceb1
15 changed files with 451 additions and 199 deletions
+3 -6
View File
@@ -710,16 +710,13 @@ func (m *Manager) listTasksText(ctx context.Context) (string, error) {
if t.TodoItem != nil {
started[*t.TodoItem] = true
}
agent := "no agent"
agent := string(t.State)
sess, found, err := m.liveSession(ctx, t.Id)
if err != nil {
return "", err
}
if found {
agent = fmt.Sprintf("agent %s", sess.State)
if sess.Model != "" {
agent += " on " + sess.Model
}
if found && sess.Model != "" {
agent += "; agent on " + sess.Model
}
open := 0
for _, i := range items {