Skip to content

Commit 0a04fa8

Browse files
committed
fix: 🐛 More fixes
1 parent a39b2db commit 0a04fa8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

extensions/cli/src/util/cli.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ describe("CLI utility functions", () => {
100100
expect(hasSuppliedPrompt()).toBe(true);
101101
});
102102

103-
it("should return true when --agent flag is present", () => {
104-
process.argv = ["node", "script.js", "-p", "--agent"];
105-
expect(hasSuppliedPrompt()).toBe(true);
103+
it("should return false when --agent flag is present (agent slug is not a prompt)", () => {
104+
process.argv = ["node", "script.js", "-p", "--agent", "my-agent"];
105+
expect(hasSuppliedPrompt()).toBe(false);
106106
});
107107

108108
it("should return false when -p is last argument with no prompt", () => {

extensions/cli/src/util/cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export function hasSuppliedPrompt(): boolean {
6363
"--output",
6464
"--mode",
6565
"--workflow",
66+
"--agent",
6667
"-m",
6768
"-c",
6869
"-o",

0 commit comments

Comments
 (0)