mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 21:03:42 +00:00
Add ./hooks subpath export for cleaner imports
This commit is contained in:
parent
7c553acd1e
commit
1abc635044
4 changed files with 18 additions and 11 deletions
|
|
@ -480,7 +480,7 @@ Hooks are TypeScript modules that extend pi's behavior by subscribing to lifecyc
|
|||
**Quick example** (permission gate):
|
||||
|
||||
```typescript
|
||||
import type { HookAPI } from "@mariozechner/pi-coding-agent";
|
||||
import type { HookAPI } from "@mariozechner/pi-coding-agent/hooks";
|
||||
|
||||
export default function (pi: HookAPI) {
|
||||
pi.on("tool_call", async (event, ctx) => {
|
||||
|
|
@ -499,7 +499,7 @@ Use `pi.send(text, attachments?)` to inject messages into the session. If the ag
|
|||
|
||||
```typescript
|
||||
import * as fs from "node:fs";
|
||||
import type { HookAPI } from "@mariozechner/pi-coding-agent";
|
||||
import type { HookAPI } from "@mariozechner/pi-coding-agent/hooks";
|
||||
|
||||
export default function (pi: HookAPI) {
|
||||
pi.on("session_start", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue