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