MCPcopy
hub / github.com/topoteretes/cognee / select

Function select

cognee/modules/visualization/views/memory_map.js:668–682  ·  view source on GitHub ↗
(kind, id, el)

Source from the content-addressed store, hash-verified

666 }
667
668 function select(kind, id, el) {
669 clearSelection();
670 selection = { kind: kind, id: id };
671 if (el) el.classList.add('is-selected');
672 else (unitEls[id] || []).forEach(function (e) { e.classList.add('is-selected'); });
673 const fn = {
674 document: openDocumentPanel, chunk: openChunkPanel, entity: openEntityPanel,
675 summary: openSummaryPanel, bucket: openBucketPanel,
676 group: function (gid) {
677 const grp = L.groups.find(function (g) { return g.type_id === gid; });
678 if (grp) openGroupPanel(grp);
679 },
680 }[kind];
681 if (fn) fn(id);
682 }
683
684 function selectNodeById(id) {
685 const kindByStage = { document: 'document', chunk: 'chunk', entity: 'entity', summary: 'summary', context: 'bucket', type: 'group' };

Callers 15

get_latest_qa_entriesMethod · 0.85
get_all_qa_entriesMethod · 0.85
get_qa_entries_by_idsMethod · 0.85
_update_qa_payloadMethod · 0.85
get_agent_trace_countMethod · 0.85
get_usage_logsMethod · 0.85
get_valueMethod · 0.85
get_datasetsMethod · 0.85

Calls 4

clearSelectionFunction · 0.85
openGroupPanelFunction · 0.85
findMethod · 0.80
addMethod · 0.45

Tested by 13

test_local_file_deletionFunction · 0.68
test_local_file_deletionFunction · 0.68
_qa_expirationsFunction · 0.68
_fetch_expirationsFunction · 0.68
verifyFunction · 0.68
_dataset_idFunction · 0.68
mainFunction · 0.68