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

Function run

graph-ui/src/diagnostics/DiagnosticsPanel.tsx:36–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34 const index = diagnosis?.reading.index ?? coverage;
35 const records = useMemo(() => diagnosticRecords(index), [index]);
36 const run = async () => {
37 const ticket = ++request.current;
38 setBusy(true); setError(null); setStatus('');
39 try {
40 const reading = await loadCoverage(client, project);
41 if (ticket !== request.current) return;
42 const pathAnswer = path ? await loadPathCoverage(client, project, path) : undefined;
43 if (ticket !== request.current) return;
44 const result: LocalDiagnosis = { project, requestedPath: path, checkedAt: new Date().toISOString(), reading, pathAnswer };
45 setDiagnosis(result); setReport(localDiagnosticReport(result)); onCoverage?.(reading);
46 } catch (reason) {
47 if (ticket === request.current) setError(reason instanceof Error ? reason.message : String(reason));
48 } finally {
49 if (ticket === request.current) setBusy(false);
50 }
51 };
52 const copy = async () => {
53 try {
54 if (!navigator.clipboard?.writeText) throw new Error('Clipboard unavailable; select the draft and copy it manually.');

Callers 1

DiagnosticsPanelFunction · 0.70

Calls 4

loadCoverageFunction · 0.90
loadPathCoverageFunction · 0.90
localDiagnosticReportFunction · 0.90
setStatusFunction · 0.85

Tested by

no test coverage detected