Merge pull request #621 from kaofelix/fix-register-flag-docs

fix(coding-agent): remove -- from registerFlag calls
This commit is contained in:
Mario Zechner 2026-01-11 03:19:29 +01:00 committed by GitHub
commit 6db2d0770a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -1041,7 +1041,7 @@ Register custom CLI flags (parsed automatically, shown in `--help`):
```typescript
export default function (pi: ExtensionAPI) {
pi.registerFlag("--dry-run", {
pi.registerFlag("dry-run", {
description: "Run without making changes",
type: "boolean",
});

View file

@ -190,7 +190,7 @@ export default function (pi: ExtensionAPI) {
pi.registerTool({ ... });
pi.registerCommand("name", { ... });
pi.registerShortcut("ctrl+x", { ... });
pi.registerFlag("--my-flag", { ... });
pi.registerFlag("my-flag", { ... });
}
```
@ -809,7 +809,7 @@ pi.registerShortcut("ctrl+shift+p", {
Register a CLI flag.
```typescript
pi.registerFlag("--plan", {
pi.registerFlag("plan", {
description: "Start in plan mode",
type: "boolean",
default: false,

View file

@ -429,7 +429,7 @@ describe("extensions discovery", () => {
it("loads extension with flags", async () => {
const extCode = `
export default function(pi) {
pi.registerFlag("--my-flag", {
pi.registerFlag("my-flag", {
description: "My custom flag",
handler: async (value) => {},
});

View file

@ -213,7 +213,7 @@ describe("ExtensionRunner", () => {
it("collects flags from extensions", async () => {
const extCode = `
export default function(pi) {
pi.registerFlag("--my-flag", {
pi.registerFlag("my-flag", {
description: "My flag",
handler: async () => {},
});
@ -231,7 +231,7 @@ describe("ExtensionRunner", () => {
it("can set flag values", async () => {
const extCode = `
export default function(pi) {
pi.registerFlag("--test-flag", {
pi.registerFlag("test-flag", {
description: "Test flag",
handler: async () => {},
});