Custom agent frontmatter: accept array for `model:` field
- 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ả
### Feature request
Allow custom agent markdown frontmatter to accept an **array** of strings for the `model:` field, in addition to a single string.
### Motivation
VS Code chat modes already support `model:` as a list — it's used to present a model picker for the chat mode. This means the same agent definition file can't currently be shared cleanly between VS Code and Copilot CLI: the CLI rejects the file with:
`custom agent markdown frontmatter is malformed: model: Expected string, received array`
This forces plugin authors to either:
- Maintain two copies of every agent file (one for VS Code, one for CLI), or
- Pick one tool and accept that the agent won't load in the other.
### Proposed behavior
When `model:` is an array, the CLI uses the **first** entry as the default model for that agent (and ideally treats the rest as acceptable alternates the user can switch to with `/model` while invoking the agent). When `model:` is a string, behavior is unchanged.
### Alternatives considered
- Authors flatten `model:` to a single string — works in both, but loses the picker UX in VS Code.
- A local post-install patch script — fragile, breaks after every `plugin update`.
Accepting an array in the CLI parser is the only change that lets the same plugin work unmodified in both surfaces.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xác định parser frontmatter Markdown của custom-agent và phần xác thực trường model của nó. Xác minh rằng hành vi đối với string không thay đổi, các array sử dụng phần tử đầu tiên làm giá trị mặc định và các giá trị không hợp lệ vẫn tiếp tục thất bại; thêm hoặc cập nhật các bài kiểm thử parser nếu đã có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- markdown, shell
- Lĩnh vực
- cli, tooling
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 68/100