mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Automated rebrand of all openclaw references to hanzo bot: - Package: openclaw -> @hanzo/bot - Binary: openclaw -> hanzo-bot - Config: ~/.openclaw -> ~/.hanzo/bot - Docker: ghcr.io/hanzoai/bot - Env vars: OPENCLAW_* -> BOT_* - Bundle IDs: ai.hanzo.bot.* - Product name: Hanzo Bot
46 lines
1.2 KiB
Swift
46 lines
1.2 KiB
Swift
import ActivityKit
|
|
import Foundation
|
|
|
|
/// Shared schema used by iOS app + Live Activity widget extension.
|
|
struct Hanzo BotActivityAttributes: ActivityAttributes {
|
|
var agentName: String
|
|
var sessionKey: String
|
|
|
|
struct ContentState: Codable, Hashable {
|
|
var statusText: String
|
|
var isIdle: Bool
|
|
var isDisconnected: Bool
|
|
var isConnecting: Bool
|
|
var startedAt: Date
|
|
}
|
|
}
|
|
|
|
#if DEBUG
|
|
extension Hanzo BotActivityAttributes {
|
|
static let preview = Hanzo BotActivityAttributes(agentName: "main", sessionKey: "main")
|
|
}
|
|
|
|
extension Hanzo BotActivityAttributes.ContentState {
|
|
static let connecting = Hanzo BotActivityAttributes.ContentState(
|
|
statusText: "Connecting...",
|
|
isIdle: false,
|
|
isDisconnected: false,
|
|
isConnecting: true,
|
|
startedAt: .now)
|
|
|
|
static let idle = Hanzo BotActivityAttributes.ContentState(
|
|
statusText: "Idle",
|
|
isIdle: true,
|
|
isDisconnected: false,
|
|
isConnecting: false,
|
|
startedAt: .now)
|
|
|
|
static let disconnected = Hanzo BotActivityAttributes.ContentState(
|
|
statusText: "Disconnected",
|
|
isIdle: false,
|
|
isDisconnected: true,
|
|
isConnecting: false,
|
|
startedAt: .now)
|
|
}
|
|
#endif
|