mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
tui.select.pageUp/pageDown were configurable but ignored by SelectList, SettingsList, editor autocomplete, and most coding-agent selectors. In fullscreen mode, the default PageUp/PageDown also scrolled the transcript instead of reaching the focused list. - add getSelectPageIndex() and handle page keys in SelectList, SettingsList, editor autocomplete, and the model, scoped models, auth, user message, settings submenu, llama search, and /mcp selectors - add Component.capturesViewportInput: a focused component that sets it receives fullscreen viewport keys instead of the transcript, as a focused overlay already does - let page keys move an open autocomplete menu before app actions, so a remapped Ctrl+V pages the menu instead of pasting an image closes #7629 Co-authored-by: muyiyr <940955635@qq.com> |
||
|---|---|---|
| .. | ||
| extensions | ||
| sdk | ||
| README.md | ||
| rpc-client.ts | ||
| rpc-extension-ui.ts | ||
Examples
Example code for the pi-coding-agent SDK, process integration, and extensions.
CLI integration
rpc-client.ts uses the typed RpcClient to run Pi in a child process, stream events, and wait for the run to settle.
Build the coding-agent package before running it from a repository checkout:
node examples/rpc-client.ts "Explain this repository"
Directories
sdk/
Programmatic usage via createAgentSession(). Shows how to customize models, prompts, tools, extensions, and session management.
extensions/
Example extensions demonstrating:
- Lifecycle event handlers (tool interception, safety gates, context modifications)
- Custom tools (todo lists, questions, subagents, output truncation)
- Commands and keyboard shortcuts
- Custom UI (footers, headers, editors, overlays)
- Git integration (checkpoints, auto-commit)
- System prompt modifications and custom compaction
- External integrations (SSH, file watchers, system theme sync)
- Custom providers (Anthropic with custom streaming, GitLab Duo)