mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-23 15:01:16 +00:00
fix(swift): remove dead shared kit declarations (#107616)
This commit is contained in:
committed by
GitHub
parent
60a3b16dc5
commit
82d2a03d0a
@@ -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?,
|
||||
|
||||
@@ -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?,
|
||||
|
||||
@@ -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?
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user