(homeDir: string)
| 33 | } |
| 34 | |
| 35 | export 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 | |
| 46 | export function createKimiDeviceId( |
| 47 | homeDir: string, |
no outgoing calls
no test coverage detected