MCPcopy Create free account
hub / github.com/driangle/taskmd / readScopes

Function readScopes

apps/vscode/src/config.ts:159–173  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

157 * Returns an array of scope entries, or an empty array if no scopes are defined.
158 */
159export function readScopes(filePath: string): ScopeEntry[] {
160 const fileDir = path.dirname(filePath);
161 const configPath = findConfigFile(fileDir);
162 if (!configPath) return [];
163
164 const config = readConfig(configPath);
165 if (!config?.scopes) return [];
166
167 return Object.entries(config.scopes)
168 .filter(([, def]) => def !== null)
169 .map(([name, def]) => ({
170 name,
171 description: def?.description,
172 }));
173}

Callers 2

config.test.tsFile · 0.90

Calls 2

findConfigFileFunction · 0.85
readConfigFunction · 0.85

Tested by

no test coverage detected