Add a Captures tab showing screen captures from the task's agent

This commit is contained in:
Ian Gulliver
2026-10-22 20:53:28 -07:00
parent de9c9a684c
commit 5fc8a88a82
5 changed files with 140 additions and 12 deletions
+6 -2
View File
@@ -3,10 +3,10 @@ import Observation
import SwiftData
enum TaskTab: String {
case transcript, board, changes, files, page, terminal, workflow
case transcript, board, changes, files, page, captures, terminal, workflow
}
let taskTabs: [TaskTab] = [.transcript, .board, .changes, .files, .page, .terminal, .workflow]
let taskTabs: [TaskTab] = [.transcript, .board, .changes, .files, .page, .captures, .terminal, .workflow]
enum JumpTarget: Equatable {
case question(String)
@@ -215,6 +215,10 @@ final class Store {
selectedTaskId.flatMap { taskFeeds[$0] }
}
func captures(_ taskId: String) -> [Capture] {
taskFeeds[taskId]?.captures ?? []
}
func activeTasks() -> [(project: Project, task: ByreTask)] {
projects.flatMap { project in
(tasks[project.id] ?? []).filter { $0.status == .active }.map { (project, $0) }