mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:40:43 +00:00
chore: update app Swift package releases
This commit is contained in:
@@ -14,7 +14,7 @@ let package = Package(
|
||||
.library(name: "OpenClawChatUI", targets: ["OpenClawChatUI"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/steipete/ElevenLabsKit", exact: "0.1.0"),
|
||||
.package(url: "https://github.com/steipete/ElevenLabsKit", exact: "0.1.1"),
|
||||
.package(url: "https://github.com/gonzalezreal/textual", exact: "0.3.1"),
|
||||
],
|
||||
targets: [
|
||||
|
||||
@@ -141,6 +141,7 @@ private final class FakeGatewayWebSocketTask: WebSocketTasking, @unchecked Senda
|
||||
"maxBufferedBytes": 1,
|
||||
"tickIntervalMs": 30_000,
|
||||
],
|
||||
"auth": [:],
|
||||
]
|
||||
if let auth {
|
||||
payload["auth"] = auth
|
||||
|
||||
@@ -12,6 +12,25 @@ private struct TalkConfigContractFixture: Decodable {
|
||||
let payloadValid: Bool
|
||||
let expectedSelection: ExpectedSelection?
|
||||
let talk: [String: AnyCodable]
|
||||
|
||||
var gatewayResponseTalk: [String: AnyCodable] {
|
||||
guard let expectedSelection else { return self.talk }
|
||||
var config: [String: AnyCodable] = [:]
|
||||
if let voiceId = expectedSelection.voiceId {
|
||||
config["voiceId"] = AnyCodable(voiceId)
|
||||
}
|
||||
if let apiKey = expectedSelection.apiKey {
|
||||
config["apiKey"] = AnyCodable(apiKey)
|
||||
}
|
||||
var response = self.talk
|
||||
response["provider"] = AnyCodable(expectedSelection.provider)
|
||||
response["providers"] = AnyCodable([expectedSelection.provider: config])
|
||||
response["resolved"] = AnyCodable([
|
||||
"provider": AnyCodable(expectedSelection.provider),
|
||||
"config": AnyCodable(config),
|
||||
])
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
struct ExpectedSelection: Decodable {
|
||||
@@ -53,7 +72,7 @@ struct TalkConfigContractTests {
|
||||
@Test func selectionFixtures() throws {
|
||||
for fixture in try TalkConfigContractFixtureLoader.load().selectionCases {
|
||||
let selection = TalkConfigParsing.selectProviderConfig(
|
||||
fixture.talk,
|
||||
fixture.gatewayResponseTalk,
|
||||
defaultProvider: fixture.defaultProvider)
|
||||
if let expected = fixture.expectedSelection {
|
||||
#expect(selection != nil)
|
||||
|
||||
Reference in New Issue
Block a user