feat(coding-agent): add ExtensionAPI setLabel

This commit is contained in:
Mario Zechner 2026-01-17 21:18:44 +01:00
parent fde9b089f4
commit 157e4e51bf
10 changed files with 41 additions and 0 deletions

View file

@ -904,6 +904,23 @@ if (name) {
}
```
### pi.setLabel(entryId, label)
Set or clear a label on an entry. Labels are user-defined markers for bookmarking and navigation (shown in `/tree` selector).
```typescript
// Set a label
pi.setLabel(entryId, "checkpoint-before-refactor");
// Clear a label
pi.setLabel(entryId, undefined);
// Read labels via sessionManager
const label = ctx.sessionManager.getLabel(entryId);
```
Labels persist in the session and survive restarts. Use them to mark important points (turns, checkpoints) in the conversation tree.
### pi.registerCommand(name, options)
Register a command.