diff --git a/.changeset/native-install-source.md b/.changeset/native-install-source.md new file mode 100644 index 0000000000..bb5bc2768d --- /dev/null +++ b/.changeset/native-install-source.md @@ -0,0 +1,11 @@ +--- +"@moonshot-ai/kimi-code": patch +--- + +fix(cli): make native install source description platform-aware + +On macOS, script installs via the official install.sh are detected as +"native" but the message hardcoded "native (windows). Auto-update is not +supported on this platform." even though native non-Windows installs do +support auto-update. Show "native (windows)" only on win32 and just +"native" elsewhere. diff --git a/apps/kimi-code/src/cli/update/preflight.ts b/apps/kimi-code/src/cli/update/preflight.ts index 098899035c..128a4cffc4 100644 --- a/apps/kimi-code/src/cli/update/preflight.ts +++ b/apps/kimi-code/src/cli/update/preflight.ts @@ -151,6 +151,7 @@ export function renderManualUpdateMessage( target: UpdateTarget, source: InstallSource, installCommand: string, + platform: NodeJS.Platform = process.platform, ): string { let sourceDesc: string; switch (source) { @@ -164,7 +165,10 @@ export function renderManualUpdateMessage( sourceDesc = 'homebrew'; break; case 'native': - sourceDesc = 'native (windows). Auto-update is not supported on this platform.'; + sourceDesc = + platform === 'win32' + ? 'native (windows). Auto-update is not supported on this platform.' + : 'native'; break; case 'unsupported': sourceDesc = 'unsupported package manager or layout.';