feat(mac): add agent events debug window

This commit is contained in:
Peter Steinberger
2025-12-09 00:56:46 +01:00
parent 9928f1b3c1
commit 8e8e695db9
4 changed files with 163 additions and 2 deletions
@@ -0,0 +1,20 @@
import Foundation
@MainActor
final class AgentEventStore: ObservableObject {
static let shared = AgentEventStore()
@Published private(set) var events: [ControlAgentEvent] = []
private let maxEvents = 400
func append(_ event: ControlAgentEvent) {
self.events.append(event)
if self.events.count > maxEvents {
self.events.removeFirst(self.events.count - maxEvents)
}
}
func clear() {
self.events.removeAll()
}
}