Change getAllTools() to return ToolInfo[] instead of string[]
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
This commit is contained in:
@@ -887,6 +887,8 @@ Manage active tools.
|
||||
|
||||
```typescript
|
||||
const active = pi.getActiveTools(); // ["read", "bash", "edit", "write"]
|
||||
const all = pi.getAllTools(); // [{ name: "read", description: "Read file contents..." }, ...]
|
||||
const names = all.map(t => t.name); // Just names if needed
|
||||
pi.setActiveTools(["read", "bash"]); // Switch to read-only
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user