Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

feat: add shared models for dual Live Activity mode

libokai54cdb2a9d8a7
diff --git a/CodyncShared/Sources/Models/LiveActivityMode.swift b/CodyncShared/Sources/Models/LiveActivityMode.swift
new file mode 100644
index 00000000..8df123bc
--- /dev/null
+++ b/CodyncShared/Sources/Models/LiveActivityMode.swift
@@ -0,0 +1,6 @@
+import Foundation
+
+public enum LiveActivityMode: String, Codable, Sendable {
+ case overall
+ case individual
+}
diff --git a/CodyncShared/Sources/Models/OverallAttributes.swift b/CodyncShared/Sources/Models/OverallAttributes.swift
new file mode 100644
index 00000000..25c7a594
--- /dev/null
+++ b/CodyncShared/Sources/Models/OverallAttributes.swift
@@ -0,0 +1,40 @@
+import Foundation
+
+#if os(iOS)
+import ActivityKit
+
+public struct OverallAttributes: ActivityAttributes, Codable, Sendable {
+ public struct ContentState: Codable, Hashable, Sendable {
+ public let sessions: [SessionSummary]
+ public let primarySessionId: String?
+ public let totalCost: Double
+
+ public init(sessions: [SessionSummary], primarySessionId: String?, totalCost: Double) {
+ self.sessions = sessions
+ self.primarySessionId = primarySessionId
+ self.totalCost = totalCost
+ }
+ }
+
+ public init() {}
+}
+
+#else
+
+public struct OverallAttributes: Codable, Sendable {
+ public struct ContentState: Codable, Hashable, Sendable {
+ public let sessions: [SessionSummary]
+ public let primarySessionId: String?
+ public let totalCost: Double
+
+ public init(sessions: [SessionSummary], primarySessionId: String?, totalCost: Double) {
+ self.sessions = sessions
+ self.primarySessionId = primarySessionId
+ self.totalCost = totalCost
+ }
+ }
+
+ public init() {}
+}
+
+#endif
diff --git a/CodyncShared/Sources/Models/SessionSummary.swift b/CodyncShared/Sources/Models/SessionSummary.swift
new file mode 100644
index 00000000..d37d74cd
--- /dev/null
+++ b/CodyncShared/Sources/Models/SessionSummary.swift
@@ -0,0 +1,20 @@
+import Foundation
+
+public struct SessionSummary: Codable, Hashable, Sendable {
+ public let sessionId: String
+ public let projectName: String
+ public let status: SessionStatus
+ public let model: String
+ public let currentTask: String?
+ public let costUSD: Double
+
+ public init(sessionId: String, projectName: String, status: SessionStatus,
+ model: String, currentTask: String?, costUSD: Double) {
+ self.sessionId = sessionId
+ self.projectName = projectName
+ self.status = status
+ self.model = model
+ self.currentTask = currentTask
+ self.costUSD = costUSD
+ }
+}