Show task status in the composer bar instead of floating pills
This commit is contained in:
@@ -210,11 +210,9 @@ final class Store {
|
||||
if inbox.contains(where: { $0.taskId == task.id }) {
|
||||
return TaskState(kind: .answer, label: "Needs your answer", title: "The agent asked a question")
|
||||
}
|
||||
if task.merging {
|
||||
return TaskState(kind: .merging, label: "Merging", title: "The merge turn is running")
|
||||
}
|
||||
if task.mergingIntoParent {
|
||||
return TaskState(kind: .merging, label: "Merging", title: "Waiting for the parent task's agent to merge it")
|
||||
let busy = progress(task)
|
||||
if let busy, busy.kind == .merging {
|
||||
return busy
|
||||
}
|
||||
if task.mergeQueuedAt != nil {
|
||||
return TaskState(kind: .held, label: "Merge held", title: "Waiting for the merge in progress in this project to finish")
|
||||
@@ -222,8 +220,8 @@ final class Store {
|
||||
if task.mergeAfterReview {
|
||||
return TaskState(kind: .held, label: "Merge after review", title: "Merges when the running review finishes with no findings")
|
||||
}
|
||||
if let working = workingTitles[task.state] {
|
||||
return TaskState(kind: .working, label: working.label, title: working.title)
|
||||
if let busy {
|
||||
return busy
|
||||
}
|
||||
switch task.ready {
|
||||
case .merge:
|
||||
@@ -236,6 +234,19 @@ final class Store {
|
||||
return TaskState(kind: .idle, label: "Idle", title: "Waiting for a message")
|
||||
}
|
||||
|
||||
func progress(_ task: ByreTask) -> TaskState? {
|
||||
if task.merging {
|
||||
return TaskState(kind: .merging, label: "Merging", title: "The merge turn is running")
|
||||
}
|
||||
if task.mergingIntoParent {
|
||||
return TaskState(kind: .merging, label: "Merging", title: "Waiting for the parent task's agent to merge it")
|
||||
}
|
||||
if let working = workingTitles[task.state] {
|
||||
return TaskState(kind: .working, label: working.label, title: working.title)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func taskRank(_ task: ByreTask) -> Int {
|
||||
if task.discarding {
|
||||
return 4
|
||||
|
||||
Reference in New Issue
Block a user