mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 02:03:42 +00:00
style(tui): Apply biome formatting fixes
This commit is contained in:
parent
6e40c5d761
commit
7e3b94ade6
1 changed files with 18 additions and 19 deletions
|
|
@ -382,18 +382,17 @@ export class TUI extends Container {
|
|||
const viewportChangePosition = firstChangedLine - oldViewportStart;
|
||||
|
||||
// Move cursor to the change position
|
||||
const linesToMoveUp = (cursorPosition - oldViewportStart) - viewportChangePosition;
|
||||
const linesToMoveUp = cursorPosition - oldViewportStart - viewportChangePosition;
|
||||
if (linesToMoveUp > 0) {
|
||||
output += `\x1b[${linesToMoveUp}A`;
|
||||
}
|
||||
|
||||
// Now do surgical updates or partial clear based on what's more efficient
|
||||
let currentLine = firstChangedLine;
|
||||
let currentViewportLine = viewportChangePosition;
|
||||
const currentViewportLine = viewportChangePosition;
|
||||
|
||||
// If we have significant structural changes, just clear and re-render from here
|
||||
const hasSignificantChanges = totalNewLines !== totalOldLines ||
|
||||
(totalNewLines - firstChangedLine) > 10; // Arbitrary threshold
|
||||
const hasSignificantChanges = totalNewLines !== totalOldLines || totalNewLines - firstChangedLine > 10; // Arbitrary threshold
|
||||
|
||||
if (hasSignificantChanges) {
|
||||
// Clear from cursor to end of screen and render all remaining lines
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue