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
+2
-1
@@ -1008,7 +1008,8 @@ export class AcpAgent {
|
||||
if (s.prompting || s.turns.queued().length) throw new RpcError(INVALID_PARAMS, "this session is working — rewind it when the reply is done")
|
||||
const reverted = s.app.turns.rewind(turnId)
|
||||
if (reverted === undefined) throw new RpcError(INVALID_PARAMS, `this session has no turn ${turnId}`)
|
||||
return { reverted }
|
||||
s.turns.forget(reverted)
|
||||
return { reverted: reverted.length }
|
||||
}
|
||||
|
||||
/** `_lembas/session/delete`: the chat was deleted in the web UI, so the session is too —
|
||||
|
||||
Reference in new issue
Block a user