Composable agent runtime monorepo built on the pi ecosystem
Find a file
Mario Zechner 565488fde6 fix(tui): fix viewport tracking and cursor positioning for overlays and content shrink
- Add maxLinesRendered to track terminal's working area (grows with content, only resets on full clear)
- Fix viewport calculation: use maxLinesRendered instead of cursorRow for correct viewport bounds
- Separate cursorRow (end of content for viewport calc) from hardwareCursorRow (actual cursor position)
- Refactor full render into fullRender(clear) helper to reduce duplication
- Fix shrink-clearing: properly clear extra lines when content shrinks
- Add PI_TUI_DEBUG=1 env var for render debugging (writes to /tmp/tui/)

The core issue was that after partial renders (e.g., overlay show/hide), the viewport
calculation used cursorRow which reflected where rendering stopped, not where content
ended. This caused incorrect viewport bounds, leading to cursor movement into scrollback
(unreachable) or rendering at wrong positions.

Additionally, when content shrank (e.g., selector dismissed), the terminal still had
the old lines as blank space. maxLinesRendered tracks this so viewport calculations
account for the terminal's actual working area.
2026-01-20 23:30:53 +01:00
.github chore: approve contributor mrud 2026-01-19 15:04:11 +00:00
.husky Add husky pre-commit hook for formatting and type checking 2025-08-11 21:15:37 +02:00
.pi chore: audit changelog entries for v0.47.0, add cl.md prompt template 2026-01-16 21:11:01 +01:00
packages fix(tui): fix viewport tracking and cursor positioning for overlays and content shrink 2026-01-20 23:30:53 +01:00
scripts fix(coding-agent): load photon wasm in compiled binaries 2026-01-18 17:11:49 +01:00
.gitignore fix(coding-agent): fix standalone binary WASM loading on Linux, fixes #784 2026-01-16 21:11:01 +01:00
AGENTS.md docs(ai): note handoff coverage for new providers 2026-01-19 00:15:46 +01:00
biome.json WIP: Remove global state from pi-ai OAuth/API key handling 2025-12-25 01:01:03 +01:00
CONTRIBUTING.md chore: add PR approval gate for new contributors 2026-01-18 12:26:45 +01:00
LICENSE Initial monorepo setup with npm workspaces and dual TypeScript configuration 2025-08-09 17:18:38 +02:00
package-lock.json Release v0.49.2 2026-01-19 16:14:07 +01:00
package.json fix: extension loading in Bun binary (#681) 2026-01-13 21:19:41 +01:00
pi-mono.code-workspace Update README to include github-copilot, google-gemini-cli, google-antigravity providers 2025-12-21 20:17:12 +01:00
pi-test.sh fix: OAuth token refresh failure returns undefined instead of throwing 2026-01-06 20:57:42 +01:00
README.md chore: add PR approval gate for new contributors 2026-01-18 12:26:45 +01:00
test.sh Merge hooks and custom-tools into unified extensions system (#454) 2026-01-05 01:43:35 +01:00
tsconfig.base.json Try fixing root level compiles 2025-12-03 14:16:00 +01:00
tsconfig.json Remove proxy package 2025-12-30 22:42:21 +01:00

pi logo

Discord Build status

Pi Monorepo

Looking for the pi coding agent? See packages/coding-agent for installation and usage.

Tools for building AI agents and managing LLM deployments.

Packages

Package Description
@mariozechner/pi-ai Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.)
@mariozechner/pi-agent-core Agent runtime with tool calling and state management
@mariozechner/pi-coding-agent Interactive coding agent CLI
@mariozechner/pi-mom Slack bot that delegates messages to the pi coding agent
@mariozechner/pi-tui Terminal UI library with differential rendering
@mariozechner/pi-web-ui Web components for AI chat interfaces
@mariozechner/pi-pods CLI for managing vLLM deployments on GPU pods

Contributing

See CONTRIBUTING.md for contribution guidelines and AGENTS.md for project-specific rules (for both humans and agents).

Development

npm install          # Install all dependencies
npm run build        # Build all packages
npm run check        # Lint, format, and type check
./test.sh            # Run tests (skips LLM-dependent tests without API keys)
./pi-test.sh         # Run pi from sources (must be run from repo root)

Note: npm run check requires npm run build to be run first. The web-ui package uses tsc which needs compiled .d.ts files from dependencies.

License

MIT