mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
Fix ctx.shutdown() not waiting for pending UI renders, fixes #756
This commit is contained in:
parent
c50bfec01b
commit
d30f6460fa
3 changed files with 69 additions and 1 deletions
|
|
@ -2075,6 +2075,10 @@ export class InteractiveMode {
|
|||
});
|
||||
}
|
||||
|
||||
// Wait for any pending renders to complete
|
||||
// requestRender() uses process.nextTick(), so we wait one tick
|
||||
await new Promise((resolve) => process.nextTick(resolve));
|
||||
|
||||
this.stop();
|
||||
process.exit(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue