MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / refreshBriefsForRef

Function refreshBriefsForRef

Support/SingleFileLibs/javascript/app.js:567–584  ·  view source on GitHub ↗
(ref)

Source from the content-addressed store, hash-verified

565 }
566
567 async function refreshBriefsForRef(ref) {
568 state.libraryBriefByName = {};
569 // Fetch all briefs in parallel with a cap
570 const concurrency = 6;
571 let idx = 0;
572 const runNext = async () => {
573 while (idx < state.libraryNames.length) {
574 const i = idx++;
575 const name = state.libraryNames[i];
576 try {
577 state.libraryBriefByName[name] = await fetchBriefForLibrary(name, ref);
578 } catch {
579 state.libraryBriefByName[name] = '';
580 }
581 }
582 };
583 await Promise.all(Array.from({ length: concurrency }, runNext));
584 }
585
586 async function onRefChanged(refType, refName) {
587 state.currentRefType = refType;

Callers 1

onRefChangedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected