feat: add Moonshot auth choice

This commit is contained in:
Peter Steinberger
2026-01-12 06:47:52 +00:00
parent 960ed66501
commit 496bad8b98
10 changed files with 316 additions and 26 deletions

View File

@@ -179,6 +179,29 @@ describe("cli program", () => {
);
});
it("passes moonshot api key to onboard", async () => {
const program = buildProgram();
await program.parseAsync(
[
"onboard",
"--non-interactive",
"--auth-choice",
"moonshot-api-key",
"--moonshot-api-key",
"sk-moonshot-test",
],
{ from: "user" },
);
expect(onboardCommand).toHaveBeenCalledWith(
expect.objectContaining({
nonInteractive: true,
authChoice: "moonshot-api-key",
moonshotApiKey: "sk-moonshot-test",
}),
runtime,
);
});
it("passes zai api key to onboard", async () => {
const program = buildProgram();
await program.parseAsync(