fix(swift): remove dead shared kit declarations (#107616)

This commit is contained in:
Peter Steinberger
2026-07-14 09:55:01 -07:00
committed by GitHub
parent 60a3b16dc5
commit 82d2a03d0a
5 changed files with 5 additions and 24 deletions

View File

@@ -149,17 +149,6 @@ public enum OpenClawChatGatewayRequests {
timeoutMs: Double(requestTimeoutMs))
}
public static func patchSessionModel(
sessionKey: String,
agentID: String?,
model: String?) -> OpenClawChatGatewayRequest
{
self.patchSessionSettings(
sessionKey: sessionKey,
agentID: agentID,
model: .some(model))
}
public static func patchSessionPreferences(
sessionKey: String,
agentID: String?,

View File

@@ -70,7 +70,6 @@ public struct OpenClawChatModelPatchResult: Decodable, Sendable, Equatable {
public let thinkingLevel: String?
public let thinkingLevels: [OpenClawChatThinkingLevelOption]?
// periphery:ignore - package tests construct patch responses; app consumers decode them.
public init(
key: String? = nil,
modelProvider: String?,

View File

@@ -685,13 +685,6 @@ public actor GatewayNodeSession {
return serverMethods.contains(method)
}
public func currentMainSessionKey(
ifCurrentRoute expectedRoute: GatewayNodeSessionRoute) -> String?
{
guard self.isCurrentRoute(expectedRoute), self.channel != nil else { return nil }
return self.mainSessionKey
}
public func waitForCurrentMainSessionKey(
ifCurrentRoute expectedRoute: GatewayNodeSessionRoute) async -> String?
{

View File

@@ -68,11 +68,11 @@ struct ChatGatewayRequestTests {
#expect(request.params["archived"] == nil)
}
@Test func `model patch request encodes default model as null`() {
let request = OpenClawChatGatewayRequests.patchSessionModel(
@Test func `settings patch request encodes default model as null`() {
let request = OpenClawChatGatewayRequests.patchSessionSettings(
sessionKey: "agent:main:main",
agentID: nil,
model: nil)
model: .some(nil))
#expect(request.params["model"]?.value is NSNull)
#expect(request.params["agentId"] == nil)

View File

@@ -3167,10 +3167,10 @@ struct GatewayNodeSessionTests {
let route = try #require(await gateway.currentRoute())
#expect(await capturedMainSessionKey.get() == "agent:main:main")
#expect(await gateway.currentMainSessionKey(ifCurrentRoute: route) == "agent:main:main")
#expect(await gateway.waitForCurrentMainSessionKey(ifCurrentRoute: route) == "agent:main:main")
await gateway.disconnect()
#expect(await gateway.currentMainSessionKey(ifCurrentRoute: route) == nil)
#expect(await gateway.waitForCurrentMainSessionKey(ifCurrentRoute: route) == nil)
}
@Test