MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / loadTopicTitles

Function loadTopicTitles

scripts/fungrim/gen-reference-doc.ts:167–176  ·  view source on GitHub ↗

topic id -> human title, read from each corpus file's header.

()

Source from the content-addressed store, hash-verified

165
166/** topic id -> human title, read from each corpus file's header. */
167function loadTopicTitles(): Map<string, string> {
168 const titles = new Map<string, string>();
169 const dir = path.join(CORPUS_DIR, 'corpus');
170 for (const f of fs.readdirSync(dir)) {
171 if (!f.endsWith('.json')) continue;
172 const data = JSON.parse(fs.readFileSync(path.join(dir, f), 'utf8'));
173 if (data.topic) titles.set(data.topic, data.title ?? data.topic);
174 }
175 return titles;
176}
177
178/** head name -> description, from both the shell and built-in audit tables. */
179function loadHeadDescriptions(decl: Declarations): Map<string, string> {

Callers 1

generateReferenceDocFunction · 0.85

Calls 2

parseMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected