review status

This commit is contained in:
Ian Gulliver
2026-10-16 08:37:24 -07:00
parent 3274bf0498
commit 5320a63358
15 changed files with 219 additions and 197 deletions
+9 -1
View File
@@ -82,7 +82,12 @@ export function currentSession(taskId: string): AgentSession | undefined {
return state.sessions.get(taskId)?.findLast((s) => s.state !== "completed") ?? state.sessions.get(taskId)?.at(-1);
}
export function currentLead(): AgentSession | undefined {
export function taskState(task: Task): string | undefined {
const s = currentSession(task.id)?.state;
return s === "idle" && task.reviewing ? "reviewing" : s;
}
export function currentLead():AgentSession | undefined {
return state.leadSessions.findLast((s) => s.state !== "completed") ?? state.leadSessions.at(-1);
}
@@ -328,6 +333,9 @@ export function handleEvent(ev: ByreEvent): void {
break;
case "review.started":
case "review.finished":
if (ev.project_id) {
void loadTasks(ev.project_id);
}
if (state.inbox.some((i) => i.task_id === ev.task_id && i.kind === "question")) {
void loadInbox();
}