A rewound turn's id is forgotten, so sending it again runs the turn anew
The turn log answered a repeated id with what that turn had answered, which was right for a prompt sent twice over a dropped link and wrong for a turn the web UI had just rewound to edit: the same id came back with the old reply. rewind now returns the ids it took out, both handlers forget them from the log, and the turn file drops them too, or the next load would have brought them back. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
7 files changed
+49
-15
No files matched your search
@@ -383,7 +383,10 @@ test("rewind: the turn and every later one leave the conversation; the next prom
|
||||
// Gone from the history and from what the model is sent; the file is as it was.
|
||||
const h: any = await c.request("_lembas/session/history", { sessionId: s.sessionId })
|
||||
expect(h.turns.filter((t: any) => t.role === "user").map((t: any) => t.text)).toEqual(["one"])
|
||||
await prompt("four", "T4")
|
||||
// The reverted ids are forgotten: the same id sent again runs anew instead of answering what
|
||||
// the reverted turn answered (LLeMbas re-sends a turn under the id of the edited message).
|
||||
await prompt("four", "T2")
|
||||
expect(fake.requests.length).toBe(4)
|
||||
const sent = JSON.stringify(fake.requests[3].messages)
|
||||
expect(sent).toContain("first answer")
|
||||
expect(sent).not.toContain("second answer")
|
||||
|
||||
Reference in new issue
Block a user