mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-24 16:21:10 +00:00
* feat(system-agent): hatch into the agent after a fresh setup applies The hatch is a ceremony: a fresh-install setup apply now announces the hatch and hands straight off (open-tui in the terminal, open-agent for gateway clients); the web custodian page lands in agent chat with the birth-sequence opener prefilled as a draft so one Send wakes the seeded BOOTSTRAP. Non-setup persistent operations keep their in-place replies. * fix(system-agent): hatch only on clean post-write verification * fix(ui): scope hatch draft to setup handoffs * fix(onboarding): seed hatch handoffs across clients * fix(i18n): refresh native hatch inventory * fix(onboarding): seed remote gateway hatch handoff * fix(macos): localize hatch draft * fix(onboarding): gate hatch on pending bootstrap * fix(i18n): sync hatch source to ios catalog * fix(onboarding): gate hatch on canonical pending state
54 lines
1.7 KiB
Swift
54 lines
1.7 KiB
Swift
import AppKit
|
|
|
|
@MainActor
|
|
enum AppNavigationActions {
|
|
static func openDashboard() {
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
if DashboardManager.shared.showConfiguredWindowIfPossible() {
|
|
return
|
|
}
|
|
Task { @MainActor in
|
|
if DashboardManager.shared.showConfiguredWindowIfPossible() {
|
|
return
|
|
}
|
|
do {
|
|
try await DashboardManager.shared.show()
|
|
} catch {
|
|
DashboardManager.shared.showFailure(error)
|
|
}
|
|
}
|
|
}
|
|
|
|
static func openChat(sessionKey: String? = nil, agentID: String? = nil, draft: String? = nil) {
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
Task { @MainActor in
|
|
let resolvedSessionKey = if let sessionKey {
|
|
sessionKey
|
|
} else {
|
|
await WebChatManager.shared.preferredSessionKey()
|
|
}
|
|
WebChatManager.shared.show(sessionKey: resolvedSessionKey, agentID: agentID, draft: draft)
|
|
}
|
|
}
|
|
|
|
static func toggleCanvas() {
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
Task { @MainActor in
|
|
if AppStateStore.shared.canvasPanelVisible {
|
|
CanvasManager.shared.hideAll()
|
|
} else {
|
|
let sessionKey = await GatewayConnection.shared.mainSessionKey()
|
|
_ = try? CanvasManager.shared.show(sessionKey: sessionKey, path: nil)
|
|
}
|
|
}
|
|
}
|
|
|
|
static func openSettings(tab: SettingsTab = .general) {
|
|
SettingsTabRouter.request(tab)
|
|
SettingsWindowOpener.shared.open()
|
|
DispatchQueue.main.async {
|
|
NotificationCenter.default.post(name: .openclawSelectSettingsTab, object: tab)
|
|
}
|
|
}
|
|
}
|