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

Function page

graph-ui/src/galaxy/graph-scope.test.ts:10–13  ·  view source on GitHub ↗
(records: Record<string, string>[], extra: Partial<QueryGraphResult> = {})

Source from the content-addressed store, hash-verified

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 };
13};
14const edgeRow = (id: number, a: GraphNode, b: GraphNode, type = 'CALLS') => ({ edge_id: String(id), edge_type: type, edge_line: '2', ...row(a, 'a_'), ...row(b, 'b_') });
15
16describe('complete scoped graph acquisition', () => {

Callers 3

continuedFunction · 0.70
degreesFunction · 0.70

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected