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

Function runNativeAssetSmokeIfRequested

apps/kimi-code/src/native/smoke.ts:37–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37export function runNativeAssetSmokeIfRequested(): boolean {
38 if (process.env['KIMI_CODE_NATIVE_ASSET_SMOKE'] !== '1') return false;
39
40 try {
41 const manifest = getEmbeddedNativeAssetManifest();
42 if (manifest === null) {
43 throw new Error('Native asset manifest is not available.');
44 }
45 for (const packageName of smokePackages) {
46 const packageRoot = getNativePackageRoot(packageName, { manifest });
47 if (packageRoot === null) {
48 throw new Error(`Native package is not available: ${packageName}`);
49 }
50 }
51 smokePiTuiNativeLoad();
52 process.stdout.write(`Native asset smoke passed: ${manifest.target}\n`);
53 process.exit(0);
54 } catch (error) {
55 const message = error instanceof Error ? error.message : String(error);
56 process.stderr.write(`Native asset smoke failed: ${message}\n`);
57 process.exit(1);
58 }
59}

Callers 1

mainFunction · 0.90

Calls 5

getNativePackageRootFunction · 0.90
smokePiTuiNativeLoadFunction · 0.85
writeMethod · 0.65
exitMethod · 0.65

Tested by

no test coverage detected