mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-21 12:04:59 +00:00
Configure: render existing auth lines in Keep existing label
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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"),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user