Extension guides
Contribution slots
NativePi controls where extension UI can appear. Choose the narrowest slot that matches the information's lifetime and the reader's task.
Choose a slot
| Slot | Use it for | Avoid |
|---|---|---|
tools | Call progress and structured results in the transcript | Persistent project controls |
entries | Custom durable session entries | Data that should enter model context |
composerWidgets | State that affects the next message | Tall, consultative content |
composerControls | One compact, frequent action or mode | Forms or multi-step interactions |
conversationViews | A complete extension workspace opened from the chat header | Small controls or turn feedback |
panels | Project information consulted beside the transcript | Urgent turn feedback |
settings | Durable extension configuration | NativePi-only copies of Pi state |
Renderer definition
export default defineRenderer({
apiVersion: 1,
protocol,
tools: {},
entries: {},
composerWidgets: [],
composerControls: [],
conversationViews: [],
panels: [],
settings: [],
});Every field except apiVersion is optional. Tool and entry renderers are records keyed by the Pi name or session-entry type. Array contributions use a unique, stable id within their slot. NativePi rejects duplicate IDs.
Ownership and conflicts
The first configured extension with a renderer for a given tool name or entry type owns that visual renderer. Array contributions coexist and are identified by package plus contribution ID.
Contributions cannot replace application navigation, routing, or the agent loop. A conversation view may replace the transcript and composer within the existing conversation pane while it is open. Use Pi APIs for anything that changes model context, tools, commands, sessions, or turn sequencing.