mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-28 14:58:40 +00:00
fix(macos): clean warnings and harden gateway/talk config parsing
This commit is contained in:
@@ -13,8 +13,10 @@ extension OnboardingView {
|
||||
guard self.state.connectionMode == .local else { return }
|
||||
let configured = await self.loadAgentWorkspace()
|
||||
let url = AgentWorkspace.resolveWorkspaceURL(from: configured)
|
||||
switch AgentWorkspace.bootstrapSafety(for: url) {
|
||||
case .safe:
|
||||
let safety = AgentWorkspace.bootstrapSafety(for: url)
|
||||
if let reason = safety.unsafeReason {
|
||||
self.workspaceStatus = "Workspace not touched: \(reason)"
|
||||
} else {
|
||||
do {
|
||||
_ = try AgentWorkspace.bootstrap(workspaceURL: url)
|
||||
if (configured ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
@@ -23,8 +25,6 @@ extension OnboardingView {
|
||||
} catch {
|
||||
self.workspaceStatus = "Failed to create workspace: \(error.localizedDescription)"
|
||||
}
|
||||
case let .unsafe (reason):
|
||||
self.workspaceStatus = "Workspace not touched: \(reason)"
|
||||
}
|
||||
self.refreshBootstrapStatus()
|
||||
}
|
||||
@@ -54,7 +54,7 @@ extension OnboardingView {
|
||||
|
||||
do {
|
||||
let url = AgentWorkspace.resolveWorkspaceURL(from: self.workspacePath)
|
||||
if case let .unsafe (reason) = AgentWorkspace.bootstrapSafety(for: url) {
|
||||
if let reason = AgentWorkspace.bootstrapSafety(for: url).unsafeReason {
|
||||
self.workspaceStatus = "Workspace not created: \(reason)"
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user