github / github/copilot-language-server-release

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

Offen
#51 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
290
Forks
24
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
api
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.