MCPcopy
hub / github.com/ChromeDevTools/chrome-devtools-mcp / loadIssueDescriptions

Function loadIssueDescriptions

src/issue-descriptions.ts:20–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 * Reads all issue descriptions from the filesystem into memory.
19 */
20export async function loadIssueDescriptions(): Promise<void> {
21 if (Object.keys(issueDescriptions).length > 0) {
22 return;
23 }
24
25 const files = await fs.promises.readdir(DESCRIPTIONS_PATH);
26 const descriptions: Record<string, string> = {};
27
28 const results = await Promise.all(
29 files
30 .filter(file => file.endsWith('.md'))
31 .map(async file => {
32 const content = await fs.promises.readFile(
33 path.join(DESCRIPTIONS_PATH, file),
34 'utf-8',
35 );
36 return {file, content};
37 }),
38 );
39
40 for (const {file, content} of results) {
41 descriptions[file] = content;
42 }
43
44 issueDescriptions = descriptions;
45}
46
47/**
48 * Gets an issue description from the in-memory cache.

Callers 2

createMcpServerFunction · 0.85
console.test.tsFile · 0.85

Calls 2

keysMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…