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

Function logForeignKimiInTheWay

apps/kimi-code/scripts/postinstall/ui.mjs:386–407  ·  view source on GitHub ↗
(foreignPath, pm)

Source from the content-addressed store, hash-verified

384 * user can decide.
385 */
386export function logForeignKimiInTheWay(foreignPath, pm) {
387 const reinstallCmd = pmGlobalInstallCommand(pm, '@moonshot-ai/kimi-code');
388 emit(
389 renderBox([
390 warningHeading('Can\'t switch to the new kimi yet'),
391 '',
392 pad(' There\'s another file called `kimi` on your computer that\'s'),
393 pad(' not the new CLI and not the old one — it looks like'),
394 pad(' something you set up yourself. As long as it\'s there,'),
395 pad(' typing `kimi` will run it instead of the new version.'),
396 '',
397 pad(' We found it at:'),
398 pathInBox(foreignPath),
399 '',
400 pad(' To use the new kimi, delete or rename that file, then'),
401 pad(' install again:'),
402 pathInBox(reinstallCmd),
403 '',
404 pad(' Nothing on your computer was changed.'),
405 ]),
406 );
407}
408
409/**
410 * The legacy `kimi` was found, but the directory where the package

Callers 1

mainFunction · 0.90

Calls 6

pmGlobalInstallCommandFunction · 0.90
renderBoxFunction · 0.85
warningHeadingFunction · 0.85
pathInBoxFunction · 0.85
emitFunction · 0.70
padFunction · 0.70

Tested by

no test coverage detected