mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 12:03:49 +00:00
fix(tui): Trigger initial render when start() is called
The demos were not showing any output until user input because: - Components were added before ui.start() was called - addChild calls requestRender() but it returns early if \!isStarted - So no initial render happened until user input triggered one Now ui.start() triggers an initial render if components exist.
This commit is contained in:
parent
838fde47ba
commit
5ceaa91c74
1 changed files with 5 additions and 0 deletions
|
|
@ -238,6 +238,11 @@ export class TUI extends Container {
|
|||
} catch (error) {
|
||||
console.error("Error starting terminal:", error);
|
||||
}
|
||||
|
||||
// Trigger initial render if we have components
|
||||
if (this.children.length > 0) {
|
||||
this.requestRender();
|
||||
}
|
||||
}
|
||||
|
||||
stop(): void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue