Skip to content

Commit 3781929

Browse files
stephentoubCopilot
andcommitted
Normalize loaded tool result snapshots
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c00300b commit 3781929

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

test/harness/replayingCapiProxy.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -762,13 +762,13 @@ describe("ReplayingCapiProxy", () => {
762762
},
763763
{
764764
role: "tool",
765-
tool_call_id: "toolcall_0",
766-
content: "CITY_PARIS",
765+
tool_call_id: "toolcall_1",
766+
content: "COUNTRY_FRANCE",
767767
},
768768
{
769769
role: "tool",
770-
tool_call_id: "toolcall_1",
771-
content: "COUNTRY_FRANCE",
770+
tool_call_id: "toolcall_0",
771+
content: "CITY_PARIS",
772772
},
773773
{ role: "assistant", content: "Paris is in France." },
774774
],

test/harness/replayingCapiProxy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export class ReplayingCapiProxy extends CapturingHttpProxy {
128128
if (this.state && existsSync(this.state.filePath)) {
129129
const content = await readFile(this.state.filePath, "utf-8");
130130
this.state.storedData = yaml.parse(content) as NormalizedData;
131+
normalizeToolResultOrder(this.state.storedData.conversations);
131132
}
132133
}
133134

0 commit comments

Comments
 (0)