mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-17 10:02:23 +00:00
docs: remove CLI-specific --extension mention from SDK example
This commit is contained in:
parent
010b337ad2
commit
7919c40907
1 changed files with 5 additions and 7 deletions
|
|
@ -4,11 +4,10 @@
|
||||||
* Extensions intercept agent events and can register custom tools.
|
* Extensions intercept agent events and can register custom tools.
|
||||||
* They provide a unified system for extensions, custom tools, commands, and more.
|
* They provide a unified system for extensions, custom tools, commands, and more.
|
||||||
*
|
*
|
||||||
* Extension files are discovered from:
|
* By default, extension files are discovered from:
|
||||||
* - ~/.pi/agent/extensions/
|
* - ~/.pi/agent/extensions/
|
||||||
* - <cwd>/.pi/extensions/
|
* - <cwd>/.pi/extensions/
|
||||||
* - Paths specified in settings.json "extensions" array
|
* - Paths specified in settings.json "extensions" array
|
||||||
* - Paths passed via --extension CLI flag
|
|
||||||
*
|
*
|
||||||
* An extension is a TypeScript file that exports a default function:
|
* An extension is a TypeScript file that exports a default function:
|
||||||
* export default function (pi: ExtensionAPI) { ... }
|
* export default function (pi: ExtensionAPI) { ... }
|
||||||
|
|
@ -16,11 +15,10 @@
|
||||||
|
|
||||||
import { createAgentSession, SessionManager } from "@mariozechner/pi-coding-agent";
|
import { createAgentSession, SessionManager } from "@mariozechner/pi-coding-agent";
|
||||||
|
|
||||||
// Extensions are loaded from disk, not passed inline to createAgentSession.
|
// Extensions are discovered automatically from standard locations.
|
||||||
// Use the discovery mechanism:
|
// You can also add paths via:
|
||||||
// 1. Place extension files in ~/.pi/agent/extensions/ or .pi/extensions/
|
// 1. settings.json: { "extensions": ["./my-extension.ts"] }
|
||||||
// 2. Add paths to settings.json: { "extensions": ["./my-extension.ts"] }
|
// 2. additionalExtensionPaths option (see below)
|
||||||
// 3. Use --extension flag: pi --extension ./my-extension.ts
|
|
||||||
|
|
||||||
// To add additional extension paths beyond discovery:
|
// To add additional extension paths beyond discovery:
|
||||||
const { session } = await createAgentSession({
|
const { session } = await createAgentSession({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue