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
29 lines
1.0 KiB
Swift
29 lines
1.0 KiB
Swift
import SwiftUI
|
|
|
|
@main
|
|
struct Hanzo BotWatchApp: App {
|
|
@State private var inboxStore = WatchInboxStore()
|
|
@State private var receiver: WatchConnectivityReceiver?
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
WatchInboxView(store: self.inboxStore) { action in
|
|
guard let receiver = self.receiver else { return }
|
|
let draft = self.inboxStore.makeReplyDraft(action: action)
|
|
self.inboxStore.markReplySending(actionLabel: action.label)
|
|
Task { @MainActor in
|
|
let result = await receiver.sendReply(draft)
|
|
self.inboxStore.markReplyResult(result, actionLabel: action.label)
|
|
}
|
|
}
|
|
.task {
|
|
if self.receiver == nil {
|
|
let receiver = WatchConnectivityReceiver(store: self.inboxStore)
|
|
receiver.activate()
|
|
self.receiver = receiver
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|