github / github/copilot-cli

Allow copilot-cli to write via tool to only specific files

Aperta
#285 0 commenti 7 reazioni 0 assegnatari Vedi su GitHub
area:permissions area:tools
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

### Describe the feature or problem you'd like to solve

When the copilot write tool option is allowed it gives access to all files

### Proposed solution

Allow to restrict the scope the model is allowed to write to, for example with directories or files
```bash
copilot --allow-tool 'write(foo.txt)' --allow-tool 'write(bar/)'
```

This is similar to the shell tool option that is already supported https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli#using-the-approval-options
```
copilot --deny-tool 'shell(git push)'
```

### Example prompts or workflows

```bash
copilot --allow-tool 'write(foo.txt)' --allow-tool 'write(bar/)'
```

### Additional context

_No response_

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.