mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Comprehensive rename of all openclaw references to hanzo-bot equivalents: - Package: openclaw → @hanzo/bot - Binary: openclaw → hanzo-bot - Types: OpenClaw* → Bot* - Env vars: OPENCLAW_* → BOT_* - Android: ai.openclaw.android → ai.hanzo.bot.android - iOS/macOS: ai.openclaw.* → ai.hanzo.* - Swift modules: OpenClaw* → Bot* - Plugins: openclaw.plugin.json → bot.plugin.json - Paths: .openclaw/ → .hanzo/bot/ - URLs: github.com/openclaw → github.com/hanzoai
29 lines
1.0 KiB
Swift
29 lines
1.0 KiB
Swift
import SwiftUI
|
|
|
|
@main
|
|
struct 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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|