fix(cli): explain port and gateway prompts

This commit is contained in:
Vincent Koc
2026-05-10 06:35:20 +08:00
parent e1a7ee6b2b
commit 554acb85a4
6 changed files with 29 additions and 17 deletions
+3 -3
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 === "How do you want to hatch your bot?") {
if (params.message === "Choose your first chat surface") {
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 === "How do you want to hatch your bot?") {
if (params.message === "Choose your first chat surface") {
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 === "How do you want to hatch your bot?") {
if (params.message === "Choose your first chat surface") {
return "tui";
}
return "later";
+4 -4
View File
@@ -67,7 +67,7 @@ const finalizeSetupWizard = vi.hoisted(() =>
}
const hatch = await options.prompter.select({
message: "How do you want to hatch your bot?",
message: "Choose your first chat surface",
options: [],
});
if (hatch !== "tui") {
@@ -346,13 +346,13 @@ describe("runSetupWizard", () => {
const caseDir = await makeCaseDir("provider-missing-id-");
const select = vi.fn(async ({ message }: WizardSelectParams<unknown>) => {
if (message === "Select setup mode") {
if (message === "Setup mode") {
return "quickstart";
}
if (message === "Select channel (QuickStart)") {
return "__skip__";
}
if (message === "How do you want to hatch your bot?") {
if (message === "Choose your first chat surface") {
return "skip";
}
return "skip";
@@ -543,7 +543,7 @@ describe("runSetupWizard", () => {
}
const select = vi.fn(async (opts: WizardSelectParams<unknown>) => {
if (opts.message === "How do you want to hatch your bot?") {
if (opts.message === "Choose your first chat surface") {
return "tui";
}
return "quickstart";