fix(coding-agent): stabilized streaming TUI rendering with readonly rows and memoized reuse
- Changed render methods to return component-owned `readonly string[]` rows. - Added `RenderStablePrefix` row reuse to avoid repainting unchanged streaming content. - Stabilized streaming gutters and spinner placement to reduce preview jitter and flicker. - Finalized commit-safe transcript behavior for tool-call previews and added streaming edge-case tests.
This commit is contained in:
@@ -68,7 +68,7 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
||||
// Refresh tool list
|
||||
allTools = pi.getAllTools();
|
||||
|
||||
await ctx.ui.custom((tui, theme, done) => {
|
||||
await ctx.ui.custom((tui, theme, _keybindings, done) => {
|
||||
// Build settings items for each tool
|
||||
const items: SettingItem[] = allTools.map(tool => ({
|
||||
id: tool,
|
||||
@@ -78,10 +78,11 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
||||
}));
|
||||
|
||||
const container = new Container();
|
||||
const header: readonly string[] = [theme.fg("accent", theme.bold("Tool Configuration")), ""];
|
||||
container.addChild(
|
||||
new (class {
|
||||
render(_width: number) {
|
||||
return [theme.fg("accent", theme.bold("Tool Configuration")), ""];
|
||||
render(_width: number): readonly string[] {
|
||||
return header;
|
||||
}
|
||||
invalidate() {}
|
||||
})(),
|
||||
@@ -110,7 +111,7 @@ export default function toolsExtension(pi: ExtensionAPI) {
|
||||
container.addChild(settingsList);
|
||||
|
||||
const component = {
|
||||
render(width: number) {
|
||||
render(width: number): readonly string[] {
|
||||
return container.render(width);
|
||||
},
|
||||
invalidate() {
|
||||
|
||||
Reference in New Issue
Block a user