Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions libs/aitools/agents/agents.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ var Registry = []Agent{
ConfigDir: homeSubdir(".config", "opencode"),
},
{
Name: "copilot",
DisplayName: "GitHub Copilot",
ConfigDir: homeSubdir(".copilot"),
Name: "copilot",
DisplayName: "GitHub Copilot",
ConfigDir: homeSubdir(".copilot"),
SupportsProjectScope: true,
ProjectConfigDir: ".github",
},
{
Name: "antigravity",
Expand Down
20 changes: 19 additions & 1 deletion libs/aitools/installer/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ func TestSupportsProjectScopeSetCorrectly(t *testing.T) {
"cursor": true,
"codex": false,
"opencode": false,
"copilot": false,
"copilot": true,
"antigravity": false,
}

Expand All @@ -903,6 +903,24 @@ func TestSupportsProjectScopeSetCorrectly(t *testing.T) {
}
}

func TestProjectScopeAgentDirectoriesSetCorrectly(t *testing.T) {
cwd := filepath.Join("tmp", "project")
expected := map[string]string{
"claude-code": filepath.Join(cwd, ".claude", "skills"),
"cursor": filepath.Join(cwd, ".cursor", "skills"),
"copilot": filepath.Join(cwd, ".github", "skills"),
}

for _, agent := range agents.Registry {
want, ok := expected[agent.Name]
if !ok {
continue
}
require.True(t, agent.SupportsProjectScope, "%s should support project scope", agent.Name)
assert.Equal(t, want, agent.ProjectSkillsDir(cwd), "project skills dir for %s", agent.Name)
}
}

func TestGetSkillsRefResolvesFromManifest(t *testing.T) {
// Pre-populate the cache so FetchManifest returns from tier 1 (local cache)
// without hitting the network. The embedded manifest fallback is tested
Expand Down