Skip to content

fix(desktop): detect Kimi Code in its default install path - #3700

Open
benthecarman wants to merge 1 commit into
block:mainfrom
benthecarman:fix-kimi-detection
Open

fix(desktop): detect Kimi Code in its default install path#3700
benthecarman wants to merge 1 commit into
block:mainfrom
benthecarman:fix-kimi-detection

Conversation

@benthecarman

Copy link
Copy Markdown
Contributor

Summary

By default on linux kimi is installed at ~/.kimi-code/bin/kimi and this was not detected automatically. This now fixes it by adding this path to the detection

Related issue

N/A

Testing

Before it did not appear / did not detect. Now it does :)

@benthecarman
benthecarman requested a review from a team as a code owner July 30, 2026 06:32
Signed-off-by: benthecarman <benthecarman@live.com>
@benthecarman benthecarman changed the title Detect Kimi Code in its default install path fix(desktop): detect Kimi Code in its default install path Jul 31, 2026
@wesbillman
wesbillman enabled auto-merge (squash) July 31, 2026 14:26
@felirami

felirami commented Aug 1, 2026

Copy link
Copy Markdown

Confirming this also reproduces on macOS, so the fix is cross-platform, not Linux-specific.

Diagnosis from an affected machine (Buzz 0.5.3, kimi-code 0.31.1):

  • The desktop app launched via Finder inherits launchd's default PATH=/usr/bin:/bin:/usr/sbin:/sbin.
  • kimi-code's installer appends ~/.kimi-code/bin to PATH in ~/.zshrc (interactive shells only), which a login shell (zsh -l -c 'command -v kimi') never sources — so the find_via_login_shell fallback in discovery.rs also misses it. Verified with env -i HOME=$HOME PATH=/usr/bin:/bin:/usr/sbin:/sbin /bin/zsh -l -c 'command -v kimi' → not found.
  • ~/.kimi-code/bin is absent from common_binary_paths(), so resolution fails at every stage. This mirrors the existing nvm special-case a few lines below ("~/.zshrc (interactive) which is not loaded by a login shell").

Adding ~/.kimi-code/bin to common_binary_paths() fixes detection regardless of the user's shell configuration. Would love to see this merged — until then the workaround for affected users is adding the export to ~/.zprofile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants