Skip to content

Conversation

@yawnbright
Copy link

What does this PR do?

resolve #10637

How did you verify your code works?

Why is it wrong now?

When we type '@', it will trigger File.search, which use ripgrep to retrieve all the files and directorys.

packages/opencode/src/file/index.ts

The command be excuted is rg --files ... eventually, and it only list files, we later use these files to extrapolate the directorys. The key point is that rg only list files.

How I resolved it?

Use fd to replace rg

I have verified it in

  • OS: macOS 15.6 / win11
  • OpenCode: 1.1.36

@github-actions
Copy link
Contributor

Hey! Your PR title fix empty directory cannot be retrieved by '@' doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@yawnbright yawnbright changed the title fix empty directory cannot be retrieved by '@' fix: replace rg Jan 26, 2026
@yawnbright yawnbright changed the title fix: replace rg fix: replace rg with fd for searching empty directory Jan 26, 2026
@yawnbright yawnbright changed the title fix: replace rg with fd for searching empty directory fix: replace rg with fd to search empty directory Jan 26, 2026
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.

Empty directory cannot be found by '@'

1 participant