mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
fix(coding-agent): remove -- from registerFlag calls
This was causing the agent sometimes to pick up on the incorrect syntax when asked to write extensions with flags
This commit is contained in:
parent
65b72cc514
commit
6d60302646
4 changed files with 6 additions and 6 deletions
|
|
@ -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",
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) => {},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 () => {},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue