test(release): tolerate OpenAI replay id preservation · openclaw/openclaw@a256745
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -261,9 +261,21 @@ describeLive("openai reasoning compat live", () => {
|
261 | 261 | "toolResult", |
262 | 262 | "user", |
263 | 263 | ]); |
| 264 | +const assistantToolIds = ( |
| 265 | +((sanitized[1] as { content?: unknown }).content ?? []) as unknown[] |
| 266 | +) |
| 267 | +.filter( |
| 268 | +(block): block is { type: "toolCall"; id: string } => |
| 269 | +typeof block === "object" && |
| 270 | +block !== null && |
| 271 | +(block as { type?: unknown }).type === "toolCall" && |
| 272 | +typeof (block as { id?: unknown }).id === "string", |
| 273 | +) |
| 274 | +.map((block) => block.id); |
| 275 | +expect(assistantToolIds).toHaveLength(3); |
264 | 276 | expect( |
265 | 277 | sanitized.slice(2, 5).map((message) => (message as { toolCallId?: string }).toolCallId), |
266 | | -).toEqual(["callkeep", "callmissinga", "callmissingb"]); |
| 278 | +).toEqual(assistantToolIds); |
267 | 279 | expect( |
268 | 280 | sanitized |
269 | 281 | .slice(3, 5) |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。