github / github/copilot-language-server-release

conversation/templates skips discovering user-global skills (~/.copilot/skills/) when workspaceFolders is empty

Đang mở
#51 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
290
Fork
24
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

When `conversation/templates` is called with an empty `workspaceFolders` array (`"workspaceFolders": []`), the language server skips discovering user-global skills located in `~/.copilot/skills/` (and `~/.github/skills/`), returning only the 12 built-in command templates.

As soon as at least one project/workspace folder is passed in `workspaceFolders`, the discovery pipeline runs and user-global skills in `~/.copilot/skills/` are returned as expected alongside project templates.

### Background

Given user-global skills installed at `~/.copilot/skills/` (e.g., `my-sample-skill/SKILL.md`):

#### 1. Empty Workspace (`workspaceFolders: []`)
* **Request:**
```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "conversation/templates",
"params": {
"workspaceFolders": []
}
}
```
* **Response:**
```json
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{ "id": "tests", "source": "builtin" },
{ "id": "simplify", "source": "builtin" },
{ "id": "fix", "source": "builtin" },
{ "id": "explain", "source": "builtin" },
{ "id": "doc", "source": "builtin" },
{ "id": "create-agent", "source": "builtin" },
{ "id": "create-skill", "source": "builtin" },
{ "id": "create-instruction", "source": "builtin" },
{ "id": "create-prompt", "source": "builtin" },
{ "id": "create-hook", "source": "builtin" },
{ "id": "feedback", "source": "builtin" },
{ "id": "help", "source": "builtin" }
]
}
```
*(Returns 12 built-in templates only; `~/.copilot/skills/` is completely omitted).*

#### 2. Non-Empty Workspace (`workspaceFolders: [{"uri": "file:///path/to/project", "name": "project"}]`)
* **Request:**
```json
{
"jsonrpc": "2.0",
"id": 2,
"method": "conversation/templates",
"params": {
"workspaceFolders": [
{ "uri": "file:///path/to/project", "name": "project" }
]
}
}
```
* **Response (SUCCESS):**
```json
{
"jsonrpc": "2.0",
"id": 2,
"result": [
{ "id": "tests", "source": "builtin" },
{ "id": "simplify", "source": "builtin" },
...
{
"id": "my-sample-skill",
"description": "Sample custom skill description",
"shortDescription": "Sample Skill",
"scopes": ["agent-panel"],
"source": "skill"
}
]
}
```

---

### Expected Behavior
User-global skills in `~/.copilot/skills/` are user-scoped, not project-scoped. `conversation/templates` should discover and include them unconditionally, even when the client currently has no workspace folders open (`workspaceFolders: []`).

---

### Impact
In GitHub Copilot for Eclipse (and any LSP-based editor integration), the Chat view relies directly on `conversation/templates` to populate the slash-command (`/`) completion popup and discovered skills. When a user launches Eclipse with an empty workspace (or closes all open projects), user-global skills completely disappear from Chat completion until a project is imported/opened.

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

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

Hướng nghiên cứu

Start at the conversation/templates request handler and trace the discovery pipeline for an empty workspaceFolders array. Reproduce the request with user-global skills in ~/.copilot/skills/ or ~/.github/skills/, then verify that the response includes those skills alongside the 12 built-in templates when no workspace is open.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
api
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

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.