mirror of
https://github.com/github/awesome-copilot.git
synced 2026-09-17 12:21:22 +00:00
chore: publish from main
This commit is contained in:
@@ -1389,7 +1389,7 @@ function generateCanvasManifest(gitDates, commitSha) {
|
||||
canvasId: id,
|
||||
extensionId: id,
|
||||
extensionName: name,
|
||||
pluginName: null,
|
||||
pluginName: name,
|
||||
name: displayName,
|
||||
version: normalizeText(ext?.version, "1.0.0"),
|
||||
readmeFile: null,
|
||||
@@ -1414,7 +1414,10 @@ function generateCanvasManifest(gitDates, commitSha) {
|
||||
imageUrl,
|
||||
assetPath: null,
|
||||
installUrl: null,
|
||||
installCommand: null,
|
||||
// Registered in plugins/external.json, so it is installable from the
|
||||
// awesome-copilot marketplace by plugin name even though it is hosted
|
||||
// externally.
|
||||
installCommand: `copilot plugin install ${name}@awesome-copilot`,
|
||||
sourceUrl,
|
||||
externalSource,
|
||||
external: true,
|
||||
@@ -1463,7 +1466,8 @@ function generateSearchIndex(
|
||||
agents,
|
||||
instructions,
|
||||
skills,
|
||||
plugins
|
||||
plugins,
|
||||
extensions
|
||||
) {
|
||||
const index = [];
|
||||
|
||||
@@ -1519,6 +1523,20 @@ function generateSearchIndex(
|
||||
});
|
||||
}
|
||||
|
||||
for (const extension of extensions) {
|
||||
index.push({
|
||||
type: "extension",
|
||||
id: extension.id,
|
||||
title: extension.name || extension.title || extension.id,
|
||||
description: extension.description || "",
|
||||
path: extension.path,
|
||||
lastUpdated: extension.lastUpdated,
|
||||
searchText:
|
||||
extension.searchText ||
|
||||
`${extension.name || extension.title || extension.id} ${extension.description || ""}`.toLowerCase(),
|
||||
});
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
@@ -1724,7 +1742,8 @@ async function main() {
|
||||
agents,
|
||||
instructions,
|
||||
skills,
|
||||
plugins
|
||||
plugins,
|
||||
extensions
|
||||
);
|
||||
console.log(`✓ Generated search index with ${searchIndex.length} items`);
|
||||
|
||||
|
||||
+3
-3
@@ -32,6 +32,8 @@ function skipsAsBundledAsset(filePath) {
|
||||
}
|
||||
}
|
||||
|
||||
const BUILD_OUTPUT_DIRECTORIES = new Set(["bin", "obj"]);
|
||||
|
||||
/**
|
||||
* Parse frontmatter from a markdown file using vfile-matter
|
||||
* Works with any markdown file that has YAML frontmatter (agents, prompts, instructions)
|
||||
@@ -168,9 +170,7 @@ function parseSkillMetadata(skillPath) {
|
||||
entries.forEach((entry) => {
|
||||
const filePath = path.join(dirPath, entry.name);
|
||||
if (entry.isDirectory()) {
|
||||
if (entry.name === "bin" || entry.name === "obj") {
|
||||
return; // Skip bin and obj directories as they are .NET project output folders and not part of the skill assets
|
||||
}
|
||||
if (BUILD_OUTPUT_DIRECTORIES.has(entry.name)) return;
|
||||
arrayOfFiles = getAllFiles(filePath, arrayOfFiles);
|
||||
} else if (
|
||||
!entry.isSymbolicLink() ||
|
||||
|
||||
@@ -72,6 +72,19 @@ test("recurses into nested and non-spec subdirectories instead of listing the di
|
||||
}
|
||||
});
|
||||
|
||||
test("excludes ignored build output directories from bundled assets", () => {
|
||||
const skillPath = createSkill({
|
||||
"SKILL.md": SKILL_MD,
|
||||
"scripts/generate.cs": "source",
|
||||
"scripts/bin/Debug/tool.dll": "build output",
|
||||
"scripts/obj/project.assets.json": "build output",
|
||||
});
|
||||
|
||||
const metadata = parseSkillMetadata(skillPath);
|
||||
|
||||
assert.deepEqual(metadata.assets, ["scripts/generate.cs"]);
|
||||
});
|
||||
|
||||
test("excludes only the root SKILL.md, keeping nested ones as bundled assets", () => {
|
||||
const skillPath = createSkill({
|
||||
"SKILL.md": SKILL_MD,
|
||||
|
||||
Reference in New Issue
Block a user