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

Function readKimiDeviceId

packages/oauth/src/identity.ts:35–44  ·  view source on GitHub ↗
(homeDir: string)

Source from the content-addressed store, hash-verified

33}
34
35export function readKimiDeviceId(homeDir: string): string | null {
36 const deviceIdPath = join(homeDir, 'device_id');
37 if (!existsSync(deviceIdPath)) return null;
38 try {
39 const text = readFileSync(deviceIdPath, 'utf-8').trim();
40 return text.length > 0 ? text : null;
41 } catch {
42 return null;
43 }
44}
45
46export function createKimiDeviceId(
47 homeDir: string,

Callers 3

identity.test.tsFile · 0.90
createKimiDeviceIdFunction · 0.85
resolveUpdateDeviceIdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected