fix(vscode): move "Browse files..." to end of @-mention dropdown#12183
Open
AmariahAK wants to merge 1 commit into
Open
fix(vscode): move "Browse files..." to end of @-mention dropdown#12183AmariahAK wants to merge 1 commit into
AmariahAK wants to merge 1 commit into
Conversation
When using @-mention in the VS Code prompt, the "Browse files..." option was always the default selection instead of the closest matching file. This happened because FILE_PICKER_RESULT was placed before the actual file results in buildMentionResults. Move FILE_PICKER_RESULT after the file results so the closest matching file is the default selection. "Browse files..." remains always available at the bottom of the list. Fixes Kilo-Org#12182 Co-authored-by: atlarix-agent <agent@atlarix.dev>
|
@atlarix-agent is attempting to deploy a commit to the Kilo Code Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by gpt-5.6-sol · Input: 53.8K · Output: 4.9K · Cached: 253.2K Review guidance: REVIEW.md from base branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #12182
Issue
When using @-mention in the VS Code prompt, the "Browse files..." option was always the default selection instead of the closest matching file. Pressing Enter would open the native file picker rather than inserting the matched file.
Context
This regression was introduced in v7.4.7 alongside the "Browse files..." feature. The
FILE_PICKER_RESULTentry was placed before the actual file matches in the results array, so it occupied index 0 and became the default selection.Implementation
One-line swap in
buildMentionResults— movedFILE_PICKER_RESULTfrom before...resultsto after. Actual file matches now sit at index 0, making them the default selection. "Browse files..." remains always available at the bottom of the dropdown list.This approach was chosen over alternatives:
mentionIndexto start at 1 — fragile when terminal/git-changes entries are also presentFiles changed:
packages/kilo-vscode/webview-ui/src/hooks/file-mention-utils.ts— swapped orderpackages/kilo-vscode/tests/unit/file-mention-utils.test.ts— updated 7 assertions to match.changeset/file-picker-default-selection.md— patch changeset forkilo-codeHow to Test
Manual/local verification
bun run extensionfrom repo root@followed by a partial filenameReviewer test steps
cd packages/kilo-vscodebun test ./tests/unit/file-mention-utils.test.ts— 67 pass, 0 failbun run typecheck— cleanbun run extensionand test@-mention manually as described aboveChecklist