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

Function pollImpl

packages/oauth/test/oauth-manager.test.ts:789–795  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

787 };
788 let n = 0;
789 const pollImpl = async (): Promise<DevicePollResult> => {
790 n += 1;
791 if (n === 1) return { kind: 'pending', errorCode: 'authorization_pending', description: '' };
792 if (n === 2) return { kind: 'pending', errorCode: 'slow_down', description: '' };
793 if (n === 3) return { kind: 'pending', errorCode: 'slow_down', description: '' };
794 return { kind: 'success', token: makeToken() };
795 };
796 const mgr = new OAuthManager({
797 config,
798 storage,

Callers

nothing calls this directly

Calls 1

makeTokenFunction · 0.70

Tested by

no test coverage detected