Skip to content

Feature Request: Allow/filter/ignore/include/exclude files/paths and file types/languages #899

@jack5github

Description

@jack5github

Describe the feature or problem you'd like to solve

There is no way to allow or disallow specific files or file types from being viewed and edited by GitHub Copilot.

Proposed solution

Giving complete control over the GitHub Copilot CLI's ability to view and edit files will allow for file operations to be both at their most efficient but also incredibly secure, especially in contexts where the CLI is not being run in interactive mode. Bonus points if view and edit permissions can be managed separately. This feature request should be rolled up as part of #316.

Example prompts or workflows

In interactive mode:

/allow-path # Allow the CLI to see file paths that match this pattern. If any are present, all other paths are disallowed.
/list-paths # List all allowed and disallowed file paths, and allow them to be interactively selected and removed from the list.
/disallow-path # Disallow the CLI from seeing file paths that match this pattern.

From the command line (these filters complement the configuration set in interactve mode):

copilot -p "What are the purposes of each .bat file in this repository?" --allow-path *.bat
copilot -p "Identify all the README files in this repository and what they each represent." --allow-path README.md --allow-path */*README.md
copilot -p "Are there any image files in this repository?" --disallow-path *.webp # Find images to compress

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions