diff --git a/docs/skills/authoring-extensions.md b/docs/skills/authoring-extensions.md index 5ad83d975..11c5c74c2 100644 --- a/docs/skills/authoring-extensions.md +++ b/docs/skills/authoring-extensions.md @@ -37,7 +37,7 @@ export default function myExtension(pi: ExtensionAPI) { }); // Slash command: /greet - pi.registerCommand("greet", { + pi.commands.register("greet", { description: "Send a greeting into the conversation", handler: async (args, ctx) => { const name = args.trim() || "world"; @@ -120,7 +120,7 @@ Multiple entry points are supported: ## Registering commands ```ts -pi.registerCommand("my-cmd", { +pi.commands.register("my-cmd", { description: "What the command does", handler: async (args, ctx) => { // args: everything the user typed after /my-cmd diff --git a/docs/skills/examples/hello-extension/index.ts b/docs/skills/examples/hello-extension/index.ts index 9ce1faab8..d1f31feb6 100644 --- a/docs/skills/examples/hello-extension/index.ts +++ b/docs/skills/examples/hello-extension/index.ts @@ -9,7 +9,7 @@ export default function helloExtension(pi: ExtensionAPI) { }); // Register a /hello slash command that sends a greeting into the conversation. - pi.registerCommand("hello", { + pi.commands.register("hello", { description: "Send a greeting into the conversation", handler: async (_args, ctx) => { ctx.ui.notify("Hello from my extension!", "info");