fix(tui): search files inside reference directory with @alias/#34173
Open
dsy122 wants to merge 4 commits into
Open
fix(tui): search files inside reference directory with @alias/#34173dsy122 wants to merge 4 commits into
dsy122 wants to merge 4 commits into
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs Found:
Both PRs address the same core issue: enabling file search/autocomplete inside reference directories (like |
Author
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.
Issue for this PR
Closes #34106
Type of change
What does this PR do?
Configured references (like
@docs) can't search files inside the reference directory — typing@docs/xxxshows "No matching results". The @ autocomplete was skipping file search entirely whenever a reference alias matched.This PR removes the early return, and when the user has typed / after a reference alias, scopes the file search to the reference directory (via the existing fs.find API).
@docswithout / still attaches the reference root as before.This behavior is described in the references documentation (docs: References) but was not yet implemented.
How did you verify your code works?
Configured "docs": "./packages/web/src/content/docs" in opencode.jsonc and ran bun dev . to test:
@docs→ alias shown, selecting attaches the reference root directory@docs/with typed characters → file results from within the reference@docs/references→ fuzzy-searchesreferences.mdx@packages/normal file search → unchanged@agentnames and /commands → unaffectedScreenshots / recordings
2026-06-27.12-48-46.mp4
Checklist