feat(tui): added component-scoped rendering with partial compose reuse
- Added `TUI.requestComponentRender`, enabling component-scoped render requests. - Implemented partial compose reuse by resolving and memoizing affected root segments. - Fixed component-scoped updates to keep frame-seam rows continuous across partial renders. - Added component-render and loader tests for reuse, downgrade, and call-count coverage.
This commit is contained in:
@@ -73,7 +73,11 @@ export class BtwPanelComponent extends Container {
|
||||
this.addChild(new Text(this.#footerLine(), 1, 0));
|
||||
this.addChild(new Spacer(1));
|
||||
this.addChild(new DynamicBorder(str => theme.fg("dim", str)));
|
||||
this.#tui.requestRender();
|
||||
// Component-scoped: a rebuild replaces only this panel's own children
|
||||
// (streaming deltas arrive per token, and a full compose would re-walk
|
||||
// the whole transcript each time). Before the panel is mounted the TUI
|
||||
// cannot resolve it and falls back to a full compose on its own.
|
||||
this.#tui.requestComponentRender(this);
|
||||
}
|
||||
|
||||
#footerLine(): string {
|
||||
|
||||
Reference in New Issue
Block a user