mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 13:24:58 +00:00
fix(agents): avoid synthetic tool-result writes on idle-timeout cleanup
This commit is contained in:
@@ -111,6 +111,17 @@ describe("installSessionToolResultGuard", () => {
|
||||
expectPersistedRoles(sm, ["assistant", "toolResult"]);
|
||||
});
|
||||
|
||||
it("clears pending tool calls without inserting synthetic tool results", () => {
|
||||
const sm = SessionManager.inMemory();
|
||||
const guard = installSessionToolResultGuard(sm);
|
||||
|
||||
sm.appendMessage(toolCallMessage);
|
||||
guard.clearPendingToolResults();
|
||||
|
||||
expectPersistedRoles(sm, ["assistant"]);
|
||||
expect(guard.getPendingIds()).toEqual([]);
|
||||
});
|
||||
|
||||
it("clears pending on user interruption when synthetic tool results are disabled", () => {
|
||||
const sm = SessionManager.inMemory();
|
||||
const guard = installSessionToolResultGuard(sm, {
|
||||
|
||||
Reference in New Issue
Block a user