MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / handleLoginCommand

Function handleLoginCommand

apps/kimi-code/src/tui/commands/auth.ts:29–41  ·  view source on GitHub ↗
(host: SlashCommandHost)

Source from the content-addressed store, hash-verified

27// ---------------------------------------------------------------------------
28
29export async function handleLoginCommand(host: SlashCommandHost): Promise<void> {
30 const platformId = await promptPlatformSelection(host);
31 if (platformId === undefined) return;
32
33 if (platformId === 'kimi-code') {
34 await handleKimiCodeOAuthLogin(host);
35 return;
36 }
37
38 const platform = getOpenPlatformById(platformId);
39 if (platform === undefined) return;
40 await handleOpenPlatformLogin(host, platform);
41}
42
43async function handleKimiCodeOAuthLogin(host: SlashCommandHost): Promise<void> {
44 const status = await host.harness.auth.status(DEFAULT_OAUTH_PROVIDER_NAME);

Callers 2

Calls 4

promptPlatformSelectionFunction · 0.90
handleKimiCodeOAuthLoginFunction · 0.85
getOpenPlatformByIdFunction · 0.85
handleOpenPlatformLoginFunction · 0.85

Tested by

no test coverage detected