github / github/copilot-cli

Allowed Tools Wizard

Đang mở
#1,429 1 bình luận 14 reaction 0 người được giao Xem trên GitHub
area:tools
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

Add a tool-selection wizard that allows user to specify a set of tools they are comfortable with the agent using rather than having to approve as agent progresses or rely on the dangerous `/yolo`

### Proposed solution

Right now the user experience around tools and CLI is pretty painful. I either need to babysit the AI for the first several actions to help approve what it can do for the rest of the session or I have to do the dangerous `/yolo` which in the docs is strongly discouraged for safety reasons. So can we get a way to approve some set of actions and have it apply across sessions? Right now if I `--resume` a session I have to go through same command approval process which is a real pain, but also starting a new session in same repo and having to jump through the hoops is a pain.
So what I'm recommending is that we add a feature to the `/init` command or something similar that has copilot run the user through a wizard where they can do things like allow file editing and `gh` cli commands super easily but also a set of rather safe Powershell/Unix commands (e.g. get last 10 lines of output from a command with `tail` or `Get-Content`) that can be quickly approved. Then copilot can also look at the repo and see that it's using `npm` and suggest `npm` commands be allowed and so on.
Then all of this info is saved to a file somewhere in the repo like under .github/copilot/tools.json or also to user level so it applies across all sessions, and new sessions can automatically have these commands approved. Then, only the new, strange commands will pop up a request for user approval.

### Example prompts or workflows

1. User runs `/init` to set up the repo and part of this is running through the commands to auto-approve for any agent working in this rep
2. AI tries to use a new command asks "Do you want to allows this?: 1) Yes 2) Yes for rest of the session 3) Yes and approve permanently 4) No" we just add in that 3rd option. I guess you could distinguish between approved forever from this directory vs any directory. I personally think putting it in the user directory so it applies to all copilot sessions makes more sense since if you allow `npm run` in one directory you'll probably allow it in another...

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.