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

Function EvidenceBlock

graph-ui/src/twin/TwinPanel.tsx:362–437  ·  view source on GitHub ↗

* Der Beleg-Knopf und, wenn er offen ist, was hinter der Behauptung steckt. * * Der Inhalt eines Eintrags ist der der Vorlage: die Relation in den Worten des * Produkts, der Ort als Datei und Zeile, die Strategie falls es eine gab, und * darunter, wer das gesagt hat und aus welchem Index-Bau.

(props: EvidenceProps)

Source from the content-addressed store, hash-verified

360 * darunter, wer das gesagt hat und aus welchem Index-Bau.
361 */
362function EvidenceBlock(props: EvidenceProps): JSX.Element {
363 return (
364 <span className="atlas-evidence">
365 <Hint name="evidence" text={EVIDENCE_BUTTON_TOOLTIP}>
366 <button
367 type="button"
368 className="atlas-evidence-btn"
369 data-testid="codeatlas-evidence-btn"
370 data-factpath={props.factPath}
371 aria-label={EVIDENCE_BUTTON_LABEL}
372 aria-expanded={props.open}
373 onClick={(event) => {
374 // Die Zeile darunter navigiert bei einem Klick, und nach
375 // einem Beleg zu fragen ist nicht dasselbe wie navigieren.
376 event.stopPropagation();
377 event.preventDefault();
378 props.onToggle(props.factPath);
379 }}
380 >
381 ?
382 </button>
383 </Hint>
384 {props.open && (
385 <span
386 className="atlas-evidence-list"
387 data-testid="codeatlas-evidence-popover"
388 data-factpath={props.factPath}
389 role="group"
390 aria-label={EVIDENCE_POPOVER_TITLE}
391 >
392 {props.entries.length === 0 && (
393 <span className="atlas-evidence-empty">{EVIDENCE_EMPTY}</span>
394 )}
395 {props.entries.map((entry, index) => {
396 const where = locationLabel(entry.file, entry.range?.startLine);
397 return (
398 <span
399 className="atlas-evidence-entry"
400 data-testid="codeatlas-evidence-entry"
401 data-source={entry.source}
402 key={index}
403 >
404 <span className="atlas-evidence-relation">
405 {entry.relation ?? entry.source}
406 {entry.source === 'runtime-trace' && (
407 <Hint name="evidence-runtime" text={EVIDENCE_RUNTIME_TOOLTIP}>
408 <span className="atlas-evidence-runtime">
409 {EVIDENCE_RUNTIME_BADGE}
410 </span>
411 </Hint>
412 )}
413 </span>
414 {entry.observations !== undefined && (
415 <span className="atlas-evidence-observations">
416 {evidenceObservations(entry.observations)}
417 </span>
418 )}
419 <Hint name="evidence-file" text={entry.file}>

Callers

nothing calls this directly

Calls 3

locationLabelFunction · 0.90
evidenceObservationsFunction · 0.90
evidenceAttributionFunction · 0.90

Tested by

no test coverage detected