feat: rework TUI file references - #547
Conversation
🦋 Changeset detectedLatest commit: b88e641 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21fef914fa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d682fa5ce
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c19e02e8b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Related Issue
No linked issue.
Problem
TUI file references were inconsistent across environments. The
@completion path depended on git metadata whenfdwas unavailable, which meant non-git directories and folders were not handled well. A whitespace-prefixed/could also fall through to root path suggestions.What changed
Reworked TUI file reference completion to prefer a managed
fdhelper from the Kimi CDN, download it in the background, and keep a basic filesystem fallback so@references remain usable while the helper is unavailable. Removed the git-backed file listing path, preserved regular path completion, and updated docs and tests for the new behavior.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.Verification
pnpm vitest run apps/kimi-code/test/tui/components/editor/file-mention-provider.test.ts apps/kimi-code/test/utils/process/fd-detect.test.tspnpm --filter @moonshot-ai/kimi-code run typecheckpnpm -C docs run build