fix: refresh protocol models and cron test lint · openclaw/openclaw@960f3b0
steipete
·
2026-04-24
·
via Recent Commits to openclaw:main
File tree
macos/Sources/OpenClawProtocol
shared/OpenClawKit/Sources/OpenClawProtocol
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2330,28 +2330,24 @@ public struct TalkRealtimeSessionParams: Codable, Sendable {
|
2330 | 2330 | public let provider: String? |
2331 | 2331 | public let model: String? |
2332 | 2332 | public let voice: String? |
2333 | | -public let instructions: String? |
2334 | 2333 | |
2335 | 2334 | public init( |
2336 | 2335 | sessionkey: String?, |
2337 | 2336 | provider: String?, |
2338 | 2337 | model: String?, |
2339 | | - voice: String?, |
2340 | | - instructions: String?) |
| 2338 | + voice: String?) |
2341 | 2339 | { |
2342 | 2340 | self.sessionkey = sessionkey |
2343 | 2341 | self.provider = provider |
2344 | 2342 | self.model = model |
2345 | 2343 | self.voice = voice |
2346 | | -self.instructions = instructions |
2347 | 2344 | } |
2348 | 2345 | |
2349 | 2346 | private enum CodingKeys: String, CodingKey { |
2350 | 2347 | case sessionkey = "sessionKey" |
2351 | 2348 | case provider |
2352 | 2349 | case model |
2353 | 2350 | case voice |
2354 | | -case instructions |
2355 | 2351 | } |
2356 | 2352 | } |
2357 | 2353 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2330,28 +2330,24 @@ public struct TalkRealtimeSessionParams: Codable, Sendable {
|
2330 | 2330 | public let provider: String? |
2331 | 2331 | public let model: String? |
2332 | 2332 | public let voice: String? |
2333 | | -public let instructions: String? |
2334 | 2333 | |
2335 | 2334 | public init( |
2336 | 2335 | sessionkey: String?, |
2337 | 2336 | provider: String?, |
2338 | 2337 | model: String?, |
2339 | | - voice: String?, |
2340 | | - instructions: String?) |
| 2338 | + voice: String?) |
2341 | 2339 | { |
2342 | 2340 | self.sessionkey = sessionkey |
2343 | 2341 | self.provider = provider |
2344 | 2342 | self.model = model |
2345 | 2343 | self.voice = voice |
2346 | | -self.instructions = instructions |
2347 | 2344 | } |
2348 | 2345 | |
2349 | 2346 | private enum CodingKeys: String, CodingKey { |
2350 | 2347 | case sessionkey = "sessionKey" |
2351 | 2348 | case provider |
2352 | 2349 | case model |
2353 | 2350 | case voice |
2354 | | -case instructions |
2355 | 2351 | } |
2356 | 2352 | } |
2357 | 2353 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -172,22 +172,22 @@ async function createDirectCronState(): Promise<DirectCronState> {
|
172 | 172 | }); |
173 | 173 | } |
174 | 174 | |
175 | | -async function directCronReq<TPayload = unknown>( |
| 175 | +async function directCronReq( |
176 | 176 | cronState: DirectCronState, |
177 | 177 | method: string, |
178 | 178 | params: Record<string, unknown>, |
179 | | -): Promise<{ ok: boolean; payload?: TPayload; error?: { code?: string; message?: string } }> { |
| 179 | +): Promise<{ ok: boolean; payload?: unknown; error?: { code?: string; message?: string } }> { |
180 | 180 | const { cronHandlers } = await import("./server-methods/cron.js"); |
181 | 181 | let result: |
182 | | -| { ok: boolean; payload?: TPayload; error?: { code?: string; message?: string } } |
| 182 | +| { ok: boolean; payload?: unknown; error?: { code?: string; message?: string } } |
183 | 183 | | undefined; |
184 | | -await cronHandlers[method as keyof typeof cronHandlers]({ |
| 184 | +await cronHandlers[method]({ |
185 | 185 | req: {} as never, |
186 | 186 | params, |
187 | 187 | respond: (ok, payload, error) => { |
188 | 188 | result = { |
189 | 189 | ok, |
190 | | -payload: payload as TPayload, |
| 190 | + payload, |
191 | 191 | error, |
192 | 192 | }; |
193 | 193 | }, |
@@ -204,7 +204,7 @@ async function directCronReq<TPayload = unknown>(
|
204 | 204 | isWebchatConnect: () => false, |
205 | 205 | }); |
206 | 206 | if (!result) { |
207 | | -throw new Error(`${String(method)} did not respond`); |
| 207 | +throw new Error(`${method} did not respond`); |
208 | 208 | } |
209 | 209 | return result; |
210 | 210 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。