- Remove loader exports from index.ts to break circular dependency
- Static import of index.js in loader.ts for virtualModules
- Add @mariozechner/pi-agent-core to virtualModules
- Update @mariozechner/jiti to 2.6.5 (bundles babel for Bun binary)
- Update SDK docs to use correct extension terminology
Changes from the original:
- Full custom UI with options list instead of simple ctx.ui.select()
- Option descriptions: support { label, description? } in addition to strings
- Built-in 'Other...' option with inline editor for free-text input
- Better UX: Escape in editor returns to options, Escape in options cancels
- Numbered options display (1. Option, 2. Option, etc.)
- Enhanced result rendering showing selection index
Changes from the original:
- Explicit [DONE:n] tag tracking (more accurate than auto-marking on tool_result)
- Plan: header requirement - only extracts todos from 'Plan:' sections
- Utils extracted to separate file for testability
- Better session resume - only scans messages after plan-mode-execute marker
- Context filtering - properly filters plan-mode-context custom type messages
- Refactored to directory structure (index.ts + utils.ts + README.md)
The original auto-completed steps on every tool_result, which was inaccurate
for multi-tool steps. This version uses explicit [DONE:n] markers that the
agent outputs after completing each step.
* feat: add summarize extension example
Demonstrates custom UI with markdown rendering and external model
integration for conversation summarization.
* chore: update examples/extensions/README.md with summarize.ts
Add OverlayOptions for configurable positioning (anchor, margins, offsets,
percentages). Add OverlayHandle for programmatic visibility control with
hide/setHidden/isHidden. Add visible callback for responsive overlays.
Extension API: ctx.ui.custom() now accepts overlayOptions and onHandle callback.
Examples: overlay-qa-tests.ts (10 test commands), doom-overlay (DOOM at 35 FPS).
- Add minimax to KnownProvider and Api types
- Add MINIMAX_API_KEY to getEnvApiKey()
- Generate MiniMax-M2 and MiniMax-M2.1 models
- Add context overflow detection pattern
- Add tests to all required test files
- Update README and CHANGELOG with attribution
Also fixes:
- Bedrock duplicate toolResult ID when content has multiple blocks
- Sandbox extension unused parameter lint warning
Uses @anthropic-ai/sandbox-runtime to enforce filesystem and network
restrictions on bash commands (sandbox-exec on macOS, bubblewrap on Linux).
Features:
- Per-project config via .pi/sandbox.json
- Global config via ~/.pi/agent/sandbox.json
- Enabled by default with sensible defaults
- --no-sandbox flag to disable
- /sandbox command to view current config
Breaking change: pi.getAllTools() now returns Array<{ name, description }>
instead of string[]. Extensions needing just names can use .map(t => t.name).
Removes redundant getToolInfo() method added in original PR.
Fixes#647
- /resume and --resume now toggle between Current Folder and All sessions with Tab
- SessionManager.list() and listAll() are now async with optional progress callback
- Shows loading progress (e.g. Loading 5/42) while scanning sessions
- SessionInfo.cwd field shows session working directory in All view
- Lazy loading: All sessions only loaded when user presses Tab
closes#619
Co-authored-by: Thomas Mustier <mustierthomas@gmail.com>
Fires when the model changes via /model command, model cycling (Ctrl+P),
or session restore. Includes source field and previousModel.
Add model-status.ts example extension demonstrating status bar updates.
closes#628
Expose data that extensions cannot otherwise access: git branch and
extension statuses from setStatus(). Token stats, model info, etc.
remain computable via ctx.sessionManager and ctx.model.
Demonstrates running interactive commands (vim, git rebase, htop, etc.)
with full terminal access using user_bash event and ctx.ui.custom().
- Auto-detects interactive commands from built-in list
- !i prefix to force interactive mode
- Configurable via INTERACTIVE_COMMANDS/INTERACTIVE_EXCLUDE env vars
closes#532