Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/native-install-source.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 5 additions & 1 deletion apps/kimi-code/src/cli/update/preflight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export function renderManualUpdateMessage(
target: UpdateTarget,
source: InstallSource,
installCommand: string,
platform: NodeJS.Platform = process.platform,
): string {
let sourceDesc: string;
switch (source) {
Expand All @@ -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.';
Expand Down