github / github/copilot-cli

`copilot` should make it easy to understand and fix configuration errors

Đang mở
#460 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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 bug

When `copilot` has issues reading from configuration file, it displays a error in the timeline that can be unhelpful for fixing the configuration problem:

```
× Failed to add folder to trusted list: Failed to add trusted folder: Failed to read configuration from /Users/andyfeller/.copilot/config.json: [
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"last_logged_in_user",
"host"
],
"message": "Required"
},
{
"code": "invalid_type",
"expected": "string",
"received": "undefined",
"path": [
"last_logged_in_user",
"login"
],
"message": "Required"
}
]
```

### Affected version

_No response_

### Steps to reproduce the behavior

State of the configuration file at the time:

```json
{
"banner": "always",
"theme": "auto",
"logged_in_users": [],
"last_logged_in_user": {},
"trusted_folders": []
}
```

### Expected behavior

Whether this was caused by a user modifying the configuration file or some unexpected circumstance, users should be presented with actions / commands / steps to fix their problems.

In this case here, I don't know if the only fix is to blow away the configuration file and start over OR if there was some way to ask Copilot to get this back into a good state.

Either way, the information presented to the user could use improvement:

- Use an expandable box for the technical details
- Have the timeline entry summary explain there is a problem with their configuration file
- Present users with a prompt with actions for fixing it

### 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.