fix(codex): preserve transcript sync across mode switches

This commit is contained in:
weishu
2026-07-28 12:20:54 +08:00
parent f0c7d0b7e7
commit 92958890de
6 changed files with 118 additions and 9 deletions
@@ -108,6 +108,13 @@ export abstract class BaseSessionScanner<TEvent> {
this.intervalId = setInterval(() => this.sync.invalidate(), this.options.intervalMs);
}
public async flush(): Promise<void> {
if (this.stopped) {
return;
}
await this.sync.invalidateAndAwait();
}
public async cleanup(): Promise<void> {
this.stopped = true;
if (this.intervalId) {