diff --git a/packages/coding-agent/README.md b/packages/coding-agent/README.md index ed093134..8c4331a3 100644 --- a/packages/coding-agent/README.md +++ b/packages/coding-agent/README.md @@ -901,7 +901,7 @@ Pi is opinionated about what it won't do. These are intentional design decisions **No plan mode.** Gather context in one session, write plans to file, start fresh for implementation. -**No built-in to-dos.** They confuse models. Use a TODO.md file, or [build your own](examples/custom-tools/todo.ts) with [custom tools](#custom-tools). +**No built-in to-dos.** They confuse models. Use a TODO.md file, or [build your own](examples/custom-tools/todo/) with [custom tools](#custom-tools). **No background bash.** Use tmux. Full observability, direct interaction. diff --git a/packages/coding-agent/docs/custom-tools.md b/packages/coding-agent/docs/custom-tools.md index 55166d02..d63d404a 100644 --- a/packages/coding-agent/docs/custom-tools.md +++ b/packages/coding-agent/docs/custom-tools.md @@ -192,7 +192,7 @@ interface ToolSessionEvent { **Reasons:** - `start`: Initial session load on startup -- `switch`: User switched to a different session (`/session`) +- `switch`: User switched to a different session (`/resume`) - `branch`: User branched from a previous message (`/branch`) - `clear`: User cleared the session (`/clear`) @@ -400,12 +400,12 @@ const factory: CustomToolFactory = (pi) => { ## Examples -See [`examples/custom-tools/todo.ts`](../examples/custom-tools/todo.ts) for a complete example with: +See [`examples/custom-tools/todo/index.ts`](../examples/custom-tools/todo/index.ts) for a complete example with: - `onSession` for state reconstruction - Custom `renderCall` and `renderResult` - Proper branching support via details storage Test with: ```bash -pi --tool packages/coding-agent/examples/custom-tools/todo.ts +pi --tool packages/coding-agent/examples/custom-tools/todo/index.ts ``` diff --git a/packages/coding-agent/docs/hooks.md b/packages/coding-agent/docs/hooks.md index 50383971..5580ee45 100644 --- a/packages/coding-agent/docs/hooks.md +++ b/packages/coding-agent/docs/hooks.md @@ -120,7 +120,7 @@ user branches (/branch) ├─► session (reason: "before_branch", can cancel) └─► session (reason: "branch", AFTER branch) -user switches session (/session) +user switches session (/resume) │ ├─► session (reason: "before_switch", can cancel) └─► session (reason: "switch", AFTER switch) @@ -165,7 +165,7 @@ pi.on("session", async (event, ctx) => { **Reasons:** - `start`: Initial session load on startup -- `before_switch` / `switch`: User switched sessions (`/session`) +- `before_switch` / `switch`: User switched sessions (`/resume`) - `before_clear` / `clear`: User cleared the session (`/clear`) - `before_branch` / `branch`: User branched the session (`/branch`) - `shutdown`: Process is exiting (double Ctrl+C, Ctrl+D, or SIGTERM) diff --git a/packages/coding-agent/src/core/hooks/types.ts b/packages/coding-agent/src/core/hooks/types.ts index a9451139..5cfba127 100644 --- a/packages/coding-agent/src/core/hooks/types.ts +++ b/packages/coding-agent/src/core/hooks/types.ts @@ -108,7 +108,7 @@ interface SessionEventBase { * * Lifecycle: * - start: Initial session load - * - before_switch / switch: Session switch (e.g., /session command) + * - before_switch / switch: Session switch (e.g., /resume command) * - before_clear / clear: Session clear (e.g., /clear command) * - before_branch / branch: Session branch (e.g., /branch command) * - shutdown: Process exit (SIGINT/SIGTERM) diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index ba50263f..646b3407 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -236,6 +236,9 @@ export class InteractiveMode { theme.fg("dim", "ctrl+t") + theme.fg("muted", " to toggle thinking") + "\n" + + theme.fg("dim", "ctrl+g") + + theme.fg("muted", " for external editor") + + "\n" + theme.fg("dim", "/") + theme.fg("muted", " for commands") + "\n" +