Skip to content

Bug: @ autocomplete for files with spaces requires file to be opened in VS Code first #7272

@isCopyman

Description

@isCopyman

What specific problem does this solve?

The @ file autocomplete feature does not show files with spaces in their names unless the file is first opened in a VS Code tab. This creates an inconsistent and frustrating user experience where users must manually open files before they can reference them with @.

Who is affected: All users working with files that have spaces in their names
Current behavior: Files with spaces don't appear in @ autocomplete until opened in VS Code
Expected behavior: Files with spaces should appear in @ autocomplete without requiring them to be opened first

Steps to Reproduce

  1. Create a file with spaces in the name (e.g., "test file.md")
  2. In Roo Code, type @test in the chat input
  3. Observe that "test file.md" does not appear in the autocomplete suggestions
  4. Open "test file.md" in a VS Code tab
  5. Type @test again in Roo Code
  6. Now "test file.md" appears in the autocomplete suggestions as "@test file.md"

Current vs Expected Behavior

Current: @ autocomplete only shows files with spaces if they are already opened in VS Code tabs
Expected: @ autocomplete should find and show files with spaces based on filename matching, regardless of whether they are opened

Related Issues

This appears to be a regression or incomplete fix related to:

While the core functionality was fixed to handle spaces in filenames, the file discovery/indexing mechanism for autocomplete still seems to have limitations.

Technical Context

The issue suggests that:

  • File indexing for autocomplete may prioritize or only include currently opened files
  • The file discovery mechanism might not properly scan for files with spaces in project directories
  • There may be a difference between the regex fixes for handling spaces and the file search/indexing logic

Impact

This forces users to adopt workarounds (opening files first) and breaks the natural workflow of referencing files directly through @.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions