mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
fix(tui): reduce unnecessary full redraws for better performance
- Remove height change detection (only width changes trigger full redraw) - Change clearOnShrink default to false (use PI_CLEAR_ON_SHRINK=1 to enable) - Fix viewport check to use previousLines.length instead of maxLinesRendered (prevents false positive redraws when appending lines after content shrunk) - Add clearOnShrink setting to /settings in coding-agent - Remove line truncation in custom message component (always show full content)
This commit is contained in:
parent
419c07fb19
commit
0925fafe3b
8 changed files with 80 additions and 48 deletions
|
|
@ -258,6 +258,7 @@ export class InteractiveMode {
|
|||
this.session = session;
|
||||
this.version = VERSION;
|
||||
this.ui = new TUI(new ProcessTerminal(), this.settingsManager.getShowHardwareCursor());
|
||||
this.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());
|
||||
this.headerContainer = new Container();
|
||||
this.chatContainer = new Container();
|
||||
this.pendingMessagesContainer = new Container();
|
||||
|
|
@ -2996,6 +2997,7 @@ export class InteractiveMode {
|
|||
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
||||
autocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),
|
||||
quietStartup: this.settingsManager.getQuietStartup(),
|
||||
clearOnShrink: this.settingsManager.getClearOnShrink(),
|
||||
},
|
||||
{
|
||||
onAutoCompactChange: (enabled) => {
|
||||
|
|
@ -3084,6 +3086,10 @@ export class InteractiveMode {
|
|||
this.editor.setAutocompleteMaxVisible(maxVisible);
|
||||
}
|
||||
},
|
||||
onClearOnShrinkChange: (enabled) => {
|
||||
this.settingsManager.setClearOnShrink(enabled);
|
||||
this.ui.setClearOnShrink(enabled);
|
||||
},
|
||||
onCancel: () => {
|
||||
done();
|
||||
this.ui.requestRender();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue