fix(cli): make new workspace creation explicit (#2315)
Agent callers now stay in their current workspace unless --new-workspace explicitly requests a separate local or worktree workspace.
This commit is contained in:
@@ -10,10 +10,23 @@ describe("canonical CLI surface", () => {
|
||||
expect(help).not.toContain("worktree");
|
||||
});
|
||||
|
||||
it("hides legacy run worktree syntax", () => {
|
||||
it("names explicit workspace creation without exposing older syntax", () => {
|
||||
const run = createCli().commands.find((command) => command.name() === "run");
|
||||
expect(run?.helpInformation()).toContain("--isolation <local|worktree>");
|
||||
expect(run?.helpInformation()).not.toContain("--worktree <name>");
|
||||
const help = run?.helpInformation();
|
||||
expect(help).toContain("--new-workspace <local|worktree>");
|
||||
expect(help).not.toContain("--isolation");
|
||||
expect(help).not.toContain("--worktree <name>");
|
||||
});
|
||||
|
||||
it("offers the worktree creation options on run", () => {
|
||||
const run = createCli().commands.find((command) => command.name() === "run");
|
||||
const help = run?.helpInformation();
|
||||
expect(help).toContain("--worktree-mode <mode>");
|
||||
expect(help).toContain("--worktree-slug <slug>");
|
||||
expect(help).toContain("--new-branch <name>");
|
||||
expect(help).toContain("--branch <name>");
|
||||
expect(help).toContain("--pr-number <n>");
|
||||
expect(help).toContain("--forge <forge>");
|
||||
});
|
||||
|
||||
it("uses background for execution and reserves detach for ownership", () => {
|
||||
|
||||
Reference in New Issue
Block a user