MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / k4

Function k4

graph-ui/tools/handtest-fixes-chat.mjs:541–559  ·  view source on GitHub ↗
(page)

Source from the content-addressed store, hash-verified

539}
540
541async function k4(page) {
542 const outputs = [];
543 await galaxyWithJsonb(page);
544 for (const name of ['JSONBAgg', 'BaseCommand']) {
545 let mark = await markWorker(page), from = await now(page);
546 if (name !== 'JSONBAgg') { await select(page, name); await scopeSettled(page); }
547 for (let run = 0; run < RUNS; run++) {
548 if (run === 0) await explanationDone(page); else { mark = await markWorker(page); from = await now(page); await clickExplainAgain(page); }
549 const [request] = (await sentSince(page, mark)).filter((entry) => entry.profile === 'automatic-explanation');
550 const [raw] = await answersSince(page, from);
551 outputs.push({ name, run: run + 1, card: await explanationText(page), model: raw?.output, promptHasNumberedIds: /\[(?:graph|source)-\d+\]/.test(promptText(request)), modelCalled: Boolean(request) });
552 }
553 await shot(page, 'K4', `explanation-${name}`, `The automatic explanation of ${name} after ${RUNS} runs: no "Graph 1/2/3".`);
554 }
555 await save('K4', 'outputs.json', outputs);
556 const echoes = outputs.filter((item) => /\bgraph[\s-]*\d\b/i.test(item.card));
557 check('K4', `No "Graph 1/2/3" in ${outputs.length} real explanations of JSONBAgg and BaseCommand; prompt without [graph-N]`, echoes.length === 0 && outputs.every((item) => !item.promptHasNumberedIds),
558 { runs: outputs.length, echoes: echoes.length, modelRuns: outputs.filter((item) => item.modelCalled).length, cards: outputs.map((item) => `${item.name}#${item.run}: ${item.card.replace(/\s+/g, ' ').slice(-220)}`) });
559}
560
561async function setOutputLimit(page, value) {
562 await openConfig(page);

Callers

nothing calls this directly

Calls 15

galaxyWithJsonbFunction · 0.85
markWorkerFunction · 0.85
explanationDoneFunction · 0.85
clickExplainAgainFunction · 0.85
sentSinceFunction · 0.85
answersSinceFunction · 0.85
explanationTextFunction · 0.85
promptTextFunction · 0.85
nowFunction · 0.70
selectFunction · 0.70
scopeSettledFunction · 0.70
shotFunction · 0.70

Tested by

no test coverage detected