tui: Fix differential rendering to preserve scrollback buffer

- renderDifferential now correctly handles content that exceeds viewport
- When changes are above viewport, do full re-render with scrollback clear
- When changes are in viewport, do partial re-render from change point
- All tests pass, correctly preserves 100 items in scrollback
- Issue: Still re-renders too much (entire tail from first change)
This commit is contained in:
Mario Zechner 2025-08-11 00:57:59 +02:00
parent afa807b200
commit 0131b29b2c
22 changed files with 2878 additions and 80 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-agent",
"version": "0.5.7",
"version": "0.5.8",
"description": "General-purpose agent with tool calling and session persistence",
"type": "module",
"bin": {
@ -18,7 +18,7 @@
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@mariozechner/pi-tui": "^0.5.7",
"@mariozechner/pi-tui": "^0.5.8",
"@types/glob": "^8.1.0",
"chalk": "^5.5.0",
"glob": "^11.0.3",