fix(cli): restore hatch agent wording

This commit is contained in:
Vincent Koc
2026-05-10 09:40:01 +08:00
parent eae1ffdf4a
commit 69c29a8c45
3 changed files with 11 additions and 11 deletions

View File

@@ -278,7 +278,7 @@ describe("finalizeSetupWizard", () => {
process.env.OPENCLAW_GATEWAY_PASSWORD = "resolved-gateway-password"; // pragma: allowlist secret
resolveSetupSecretInputString.mockResolvedValueOnce("resolved-gateway-password");
const select = vi.fn(async (params: { message: string }) => {
if (params.message === "Choose your first chat surface") {
if (params.message === "How do you want to hatch your agent?") {
return "tui";
}
return "later";
@@ -356,7 +356,7 @@ describe("finalizeSetupWizard", () => {
it("bounds the bootstrap hatch TUI run timeout", async () => {
vi.spyOn(fs, "access").mockResolvedValueOnce(undefined);
const select = vi.fn(async (params: { message: string }) => {
if (params.message === "Choose your first chat surface") {
if (params.message === "How do you want to hatch your agent?") {
return "tui";
}
return "later";
@@ -401,7 +401,7 @@ describe("finalizeSetupWizard", () => {
it("restores terminal state after failed TUI hatch", async () => {
launchTuiCli.mockRejectedValueOnce(new Error("TUI exited with code 1"));
const select = vi.fn(async (params: { message: string }) => {
if (params.message === "Choose your first chat surface") {
if (params.message === "How do you want to hatch your agent?") {
return "tui";
}
return "later";

View File

@@ -420,7 +420,7 @@ export async function finalizeSetupWizard(
'The first Terminal chat run will send: "Wake up, my friend!"',
"Edit BOOTSTRAP.md later to change how the agent introduces itself.",
].join("\n"),
"Start your agent",
"Hatch your agent",
);
}
@@ -440,13 +440,13 @@ export async function finalizeSetupWizard(
}
const hatchOptions: { value: "tui" | "web" | "later"; label: string }[] = [
{ value: "tui", label: "Terminal chat (recommended)" },
...(gatewayProbe.ok ? [{ value: "web" as const, label: "Browser Control UI" }] : []),
{ value: "later", label: "Set up later" },
{ value: "tui", label: "Hatch in Terminal (recommended)" },
...(gatewayProbe.ok ? [{ value: "web" as const, label: "Hatch in Browser" }] : []),
{ value: "later", label: "Hatch later" },
];
hatchChoice = await prompter.select({
message: "Choose your first chat surface",
message: "How do you want to hatch your agent?",
options: hatchOptions,
initialValue: "tui",
});

View File

@@ -67,7 +67,7 @@ const finalizeSetupWizard = vi.hoisted(() =>
}
const hatch = await options.prompter.select({
message: "Choose your first chat surface",
message: "How do you want to hatch your agent?",
options: [],
});
if (hatch !== "tui") {
@@ -352,7 +352,7 @@ describe("runSetupWizard", () => {
if (message === "Select channel (QuickStart)") {
return "__skip__";
}
if (message === "Choose your first chat surface") {
if (message === "How do you want to hatch your agent?") {
return "skip";
}
return "skip";
@@ -543,7 +543,7 @@ describe("runSetupWizard", () => {
}
const select = vi.fn(async (opts: WizardSelectParams<unknown>) => {
if (opts.message === "Choose your first chat surface") {
if (opts.message === "How do you want to hatch your agent?") {
return "tui";
}
return "quickstart";