mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
Configure: prioritize Keep existing auth option
This commit is contained in:
@@ -67,6 +67,7 @@ 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:");
|
||||
|
||||
@@ -115,8 +115,8 @@ export async function promptAuthChoiceGrouped(params: {
|
||||
? buildKeepExistingOption({ group, store: params.store })
|
||||
: undefined;
|
||||
const methodOptions: Array<{ value: string; label: string; hint?: string }> = [
|
||||
...group.options,
|
||||
...(keepExistingOption ? [keepExistingOption] : []),
|
||||
...group.options,
|
||||
{ value: BACK_VALUE, label: "Back" },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user