Configure: render existing auth lines in Keep existing label

This commit is contained in:
Benjamin Jesuiter
2026-02-17 10:46:36 +01:00
parent 874ec049cb
commit 29327ac473
2 changed files with 5 additions and 6 deletions

View File

@@ -68,10 +68,10 @@ describe("auth choice keep existing", () => {
if (params.message === "OpenAI auth method") {
const keepExisting = params.options.find((option) => option.value === "skip");
expect(params.options[0]?.value).toBe("skip");
expect(keepExisting?.label).toBe("Keep existing");
expect(keepExisting?.hint).toContain("APIKey:");
expect(keepExisting?.hint).toContain("OAuth:");
expect(keepExisting?.hint).toContain("\n");
expect(keepExisting?.label).toContain("Keep existing");
expect(keepExisting?.label).toContain("\n APIKey:");
expect(keepExisting?.label).toContain("\n OAuth:");
expect(keepExisting?.hint).toBeUndefined();
return "skip";
}
return params.options[0]?.value ?? "skip";

View File

@@ -65,8 +65,7 @@ export function buildKeepExistingOption(params: {
}
return {
value: "skip",
label: "Keep existing",
hint: lines.join("\n"),
label: ["Keep existing", ...lines.map((line) => ` ${line}`)].join("\n"),
};
}