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

Function row

graph-ui/src/galaxy/graph-scope.test.ts:8–9  ·  view source on GitHub ↗
(value: GraphNode, prefix = '')

Source from the content-addressed store, hash-verified

6const node = (id: number, file = 'src/a.ts', start = 1, end = 10): GraphNode => ({ id, name: `n${id}`, qualified_name: `p.n${id}`, file_path: file,
7 label: 'Function', start_line: start, end_line: end, x: id, y: 0, z: 0, color: '#abcabc', size: 3 });
8const row = (value: GraphNode, prefix = '') => Object.fromEntries(Object.entries({ id: value.id, label: value.label, name: value.name, qn: value.qualified_name,
9 file: value.file_path, start_line: value.start_line, end_line: value.end_line }).map(([key, value]) => [prefix + key, String(value ?? '')]));
10const page = (records: Record<string, string>[], extra: Partial<QueryGraphResult> = {}): QueryGraphResult => {
11 const columns = Object.keys(records[0] ?? { id: '' });
12 return { columns, rows: records.map(record => columns.map(column => record[column]!)), total: records.length, ...extra };

Callers 2

edgeRowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected