chore: format swift/ts and fix gateway lint

This commit is contained in:
Peter Steinberger
2025-12-09 17:11:25 +00:00
parent b6bd39660f
commit 8d888b426f
18 changed files with 205 additions and 121 deletions

View File

@@ -1,6 +1,6 @@
import ClawdisProtocol
import Foundation
import OSLog
import ClawdisProtocol
struct GatewayEvent: Codable {
let type: String
@@ -27,7 +27,7 @@ private actor GatewayChannelActor {
private var shouldReconnect = true
private var lastSeq: Int?
private var lastTick: Date?
private var tickIntervalMs: Double = 30_000
private var tickIntervalMs: Double = 30000
private let decoder = JSONDecoder()
private let encoder = JSONEncoder()
@@ -88,7 +88,8 @@ private actor GatewayChannelActor {
let type = obj["type"] as? String else { return false }
if type == "hello-ok" {
if let policy = obj["policy"] as? [String: Any],
let tick = policy["tickIntervalMs"] as? Double {
let tick = policy["tickIntervalMs"] as? Double
{
self.tickIntervalMs = tick
}
self.lastTick = Date()