github / github/copilot-language-server-release
conversation/templates skips discovering user-global skills (~/.copilot/skills/) when workspaceFolders is empty
- Dominant language
- No language data
- Stars
- 290
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100