mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-09 05:19:32 +08:00
fix(macos): disambiguate AnyCodable usage
This commit is contained in:
@@ -20,7 +20,7 @@ struct ControlAgentEvent: Codable, Sendable, Identifiable {
|
||||
let seq: Int
|
||||
let stream: String
|
||||
let ts: Double
|
||||
let data: [String: AnyCodable]
|
||||
let data: [String: ClawdbotProtocol.AnyCodable]
|
||||
let summary: String?
|
||||
}
|
||||
|
||||
@@ -156,8 +156,8 @@ final class ControlChannel {
|
||||
timeoutMs: Double? = nil) async throws -> Data
|
||||
{
|
||||
do {
|
||||
let rawParams = params?.reduce(into: [String: AnyCodable]()) {
|
||||
$0[$1.key] = AnyCodable($1.value.base)
|
||||
let rawParams = params?.reduce(into: [String: ClawdbotKit.AnyCodable]()) {
|
||||
$0[$1.key] = ClawdbotKit.AnyCodable($1.value.base)
|
||||
}
|
||||
let data = try await GatewayConnection.shared.request(
|
||||
method: method,
|
||||
@@ -359,13 +359,13 @@ final class ControlChannel {
|
||||
}
|
||||
|
||||
private static func bridgeToProtocolArgs(
|
||||
_ value: AnyCodable?) -> [String: ClawdbotProtocol.AnyCodable]?
|
||||
_ value: ClawdbotProtocol.AnyCodable?) -> [String: ClawdbotProtocol.AnyCodable]?
|
||||
{
|
||||
guard let value else { return nil }
|
||||
if let dict = value.value as? [String: ClawdbotProtocol.AnyCodable] {
|
||||
return dict
|
||||
}
|
||||
if let dict = value.value as? [String: AnyCodable],
|
||||
if let dict = value.value as? [String: ClawdbotKit.AnyCodable],
|
||||
let data = try? JSONEncoder().encode(dict),
|
||||
let decoded = try? JSONDecoder().decode([String: ClawdbotProtocol.AnyCodable].self, from: data)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,8 @@ import Foundation
|
||||
import Observation
|
||||
import OSLog
|
||||
|
||||
private typealias AnyCodable = ClawdbotKit.AnyCodable
|
||||
|
||||
@MainActor
|
||||
@Observable
|
||||
final class CronJobsStore {
|
||||
|
||||
@@ -3,6 +3,8 @@ import ClawdbotProtocol
|
||||
import Foundation
|
||||
import OSLog
|
||||
|
||||
private typealias AnyCodable = ClawdbotKit.AnyCodable
|
||||
|
||||
@MainActor
|
||||
final class ExecApprovalsGatewayPrompter {
|
||||
static let shared = ExecApprovalsGatewayPrompter()
|
||||
|
||||
@@ -4,6 +4,8 @@ import ClawdbotProtocol
|
||||
import Foundation
|
||||
import OSLog
|
||||
|
||||
private typealias AnyCodable = ClawdbotKit.AnyCodable
|
||||
|
||||
private let gatewayConnectionLogger = Logger(subsystem: "com.clawdbot", category: "gateway.connection")
|
||||
|
||||
enum GatewayAgentChannel: String, Codable, CaseIterable, Sendable {
|
||||
|
||||
@@ -12,6 +12,7 @@ private let onboardingWizardLogger = Logger(subsystem: "com.clawdbot", category:
|
||||
// Bridge between ClawdbotProtocol.AnyCodable and the local module to avoid
|
||||
// Swift 6 strict concurrency type conflicts.
|
||||
|
||||
private typealias AnyCodable = ClawdbotKit.AnyCodable
|
||||
private typealias ProtocolAnyCodable = ClawdbotProtocol.AnyCodable
|
||||
|
||||
private func bridgeToLocal(_ value: ProtocolAnyCodable) -> AnyCodable {
|
||||
|
||||
@@ -9,6 +9,8 @@ import SwiftUI
|
||||
|
||||
private let webChatSwiftLogger = Logger(subsystem: "com.clawdbot", category: "WebChatSwiftUI")
|
||||
|
||||
private typealias AnyCodable = ClawdbotKit.AnyCodable
|
||||
|
||||
private enum WebChatSwiftUILayout {
|
||||
static let windowSize = NSSize(width: 500, height: 840)
|
||||
static let panelSize = NSSize(width: 480, height: 640)
|
||||
|
||||
Reference in New Issue
Block a user