github / github/copilot-cli

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

Abierto
#899 4 comentarios 7 reacciones 0 asignados Ver en GitHub
area:configuration area:permissions
Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

### 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:
```bash
/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):
```bash
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_

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.