refactor(agent): return request retry action

This commit is contained in:
_Kerman
2026-07-27 21:17:49 +08:00
parent c6073f07c2
commit ed67ad53d2
83 files changed
+277 -309

No files matched your search

+2 -3
View File
@@ -200,8 +200,7 @@ export class BasicCompactService extends CompactService {
+ 'retrying from the replacement surface',
)
this.overflowRetries.set(agent, retries + 1)
agent.retry()
return
return { kind: 'retry' }
}
ctx.logger.warn(
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- the signal can abort while recovery is awaited.
@@ -216,7 +215,7 @@ export class BasicCompactService extends CompactService {
|| agent.session.surface.replaceGeneration <= generation) return next()
if (result !== null) logResult(result, 'context overflow recovery')
this.overflowRetries.set(agent, retries + 1)
agent.retry()
return { kind: 'retry' }
})
}