MCPcopy Index your code
hub / github.com/github/awesome-copilot / getSkillItemByFilePath

Function getSkillItemByFilePath

website/src/scripts/modal.ts:144–163  ·  view source on GitHub ↗
(
  filePath: string
)

Source from the content-addressed store, hash-verified

142}
143
144async function getSkillItemByFilePath(
145 filePath: string
146): Promise<SkillItem | null> {
147 if (getResourceType(filePath) !== "skill") return null;
148
149 const skillsData = await getSkillsData();
150 if (!skillsData) return null;
151
152 const rootPath = getSkillRootPath(filePath);
153 if (!rootPath) return null;
154
155 return (
156 skillsData.items.find(
157 (item) =>
158 item.path === rootPath ||
159 item.skillFile === filePath ||
160 item.files.some((file) => file.path === filePath)
161 ) || null
162 );
163}
164
165function updateModalTitle(titleText: string, filePath: string): void {
166 const title = document.getElementById("modal-title");

Callers 2

setupModalFunction · 0.85

Calls 3

getResourceTypeFunction · 0.90
getSkillsDataFunction · 0.85
getSkillRootPathFunction · 0.85

Tested by

no test coverage detected