Fix navigateTree API: add missing type updates, handler passthrough, and docs

- Update ExtensionCommandContext.navigateTree type signature
- Pass new options through in print-mode and rpc-mode handlers
- Update docs/extensions.md, docs/sdk.md, docs/tree.md
- Add changelog entry
This commit is contained in:
Mario Zechner 2026-01-16 21:47:01 +01:00
parent 6b6707f30c
commit 572ec64dbd
7 changed files with 47 additions and 6 deletions

View file

@ -733,9 +733,18 @@ Navigate to a different point in the session tree:
```typescript
const result = await ctx.navigateTree("entry-id-456", {
summarize: true,
customInstructions: "Focus on error handling changes",
replaceInstructions: false, // true = replace default prompt entirely
label: "review-checkpoint",
});
```
Options:
- `summarize`: Whether to generate a summary of the abandoned branch
- `customInstructions`: Custom instructions for the summarizer
- `replaceInstructions`: If true, `customInstructions` replaces the default prompt instead of being appended
- `label`: Label to attach to the branch summary entry (or target entry if not summarizing)
## ExtensionAPI Methods
### pi.on(event, handler)