refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import ClawdbotIPC
|
||||
import MoltbotIPC
|
||||
import Foundation
|
||||
|
||||
extension OnboardingView {
|
||||
@@ -115,7 +115,7 @@ extension OnboardingView {
|
||||
return
|
||||
}
|
||||
let command = desc.command.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let expectedTokens = ["node", "clawdbot", "tsx", "pnpm", "bun"]
|
||||
let expectedTokens = ["node", "moltbot", "tsx", "pnpm", "bun"]
|
||||
let lower = command.lowercased()
|
||||
let expected = expectedTokens.contains { lower.contains($0) }
|
||||
self.localGatewayProbe = LocalGatewayProbe(
|
||||
@@ -127,9 +127,9 @@ extension OnboardingView {
|
||||
}
|
||||
|
||||
func refreshAnthropicOAuthStatus() {
|
||||
_ = ClawdbotOAuthStore.importLegacyAnthropicOAuthIfNeeded()
|
||||
_ = MoltbotOAuthStore.importLegacyAnthropicOAuthIfNeeded()
|
||||
let previous = self.anthropicAuthDetectedStatus
|
||||
let status = ClawdbotOAuthStore.anthropicOAuthStatus()
|
||||
let status = MoltbotOAuthStore.anthropicOAuthStatus()
|
||||
self.anthropicAuthDetectedStatus = status
|
||||
self.anthropicAuthConnected = status.isConnected
|
||||
|
||||
@@ -154,7 +154,7 @@ extension OnboardingView {
|
||||
self.anthropicAuthVerificationFailed = false
|
||||
defer { self.anthropicAuthVerifying = false }
|
||||
|
||||
guard let refresh = ClawdbotOAuthStore.loadAnthropicOAuthRefreshToken(), !refresh.isEmpty else {
|
||||
guard let refresh = MoltbotOAuthStore.loadAnthropicOAuthRefreshToken(), !refresh.isEmpty else {
|
||||
self.anthropicAuthStatus = "OAuth verification failed: missing refresh token."
|
||||
self.anthropicAuthVerificationFailed = true
|
||||
return
|
||||
@@ -162,7 +162,7 @@ extension OnboardingView {
|
||||
|
||||
do {
|
||||
let updated = try await AnthropicOAuth.refresh(refreshToken: refresh)
|
||||
try ClawdbotOAuthStore.saveAnthropicOAuth(updated)
|
||||
try MoltbotOAuthStore.saveAnthropicOAuth(updated)
|
||||
self.refreshAnthropicOAuthStatus()
|
||||
self.anthropicAuthVerified = true
|
||||
self.anthropicAuthVerifiedAt = Date()
|
||||
|
||||
Reference in New Issue
Block a user