Flatten hello/ and question/ extension examples to single files
This commit is contained in:
@@ -9,7 +9,7 @@ Programmatic usage via `createAgentSession()`. Shows how to customize models, pr
|
||||
|
||||
### [extensions/](extensions/)
|
||||
Example extensions demonstrating:
|
||||
- Lifecycle event handlers (tool interception, safety gates)
|
||||
- Lifecycle event handlers (tool interception, safety gates, context modifications)
|
||||
- Custom tools (todo lists, subagents)
|
||||
- Commands and keyboard shortcuts
|
||||
- External integrations (git, file watchers)
|
||||
|
||||
@@ -28,8 +28,8 @@ cp permission-gate.ts ~/.pi/agent/extensions/
|
||||
| Extension | Description |
|
||||
|-----------|-------------|
|
||||
| `todo.ts` | Todo list tool + `/todos` command with custom rendering and state persistence |
|
||||
| `hello/` | Minimal custom tool example |
|
||||
| `question/` | Demonstrates `pi.ui.select()` for asking the user questions |
|
||||
| `hello.ts` | Minimal custom tool example |
|
||||
| `question.ts` | Demonstrates `ctx.ui.select()` for asking the user questions |
|
||||
| `subagent/` | Delegate tasks to specialized subagents with isolated context windows |
|
||||
|
||||
### Commands & UI
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Hello Tool - Minimal custom tool example
|
||||
*/
|
||||
|
||||
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
||||
import { Type } from "@sinclair/typebox";
|
||||
|
||||
Reference in New Issue
Block a user