This feature is only available in Visual Studio Code.
With concurrent file reading, Code Assistant can access multiple files from your workspace in a single step. This significantly streamlines the handling of tasks that require context from multiple files, since Code Assistant can collect all relevant information at once rather than read files one by one.
Main features:
Reading up to 100 files per request.
Enabled by default for a faster and simpler workflow.
Adjustable limit ranging from 1 to 100 files. Setting the limit to 1 disables concurrent reads.
Advantages:
Faster performance: Code Assistant needs less time to understand your code, which minimizes the number of steps.
Better context: Code Assistant builds a more comprehensive model of your code, generating more accurate and relevant answers.
Improved workflow: Tasks that require information from multiple files become easier to complete.
How it works
For tasks involving multiple files, Code Assistant automatically finds the relevant files and reads them all at once. This is especially useful for:
Understanding the overall structure of a component spread across multiple files.
Refactoring code with dependencies elsewhere in the codebase.
Answering questions that require a broad understanding of your project.
Code Assistant leverages this feature effectively, prioritizing the most critical files and reading them in a single batch. The read_file tool automatically accepts multiple files in a single request.
When Code Assistant requests to read multiple files, you will see a batch approval interface showing:
List of all files to read.
Paths to files along with line ranges (if specified).
File headers that open in your editor when clicked.
The Approve All and Deny All buttons for quick decision-making.
Setup
To set up concurrent file reads:
In the chat's top panel, click Settings.
On the left-hand panel, navigate to Context.
Under Concurrent file reads limit, set the maximum number of files Code Assistant can read per request, between 1 and 100. The default value is 5. Higher values can speed up tasks involving many small files but may increase memory usage. Setting the limit to 1 disables concurrent reads, reverting to reading one file at a time.