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

Function scenePictureFor

graph-ui/src/galaxy/graph-scope.ts:332–336  ·  view source on GitHub ↗
(current: GraphData | undefined, stale: GraphData | undefined, layout: GraphData | undefined)

Source from the content-addressed store, hash-verified

330 * geladenen Layouts, ist die erste Vorschau leer, und als Platzhalter stand
331 * dann eine leere Flaeche statt des Graphen, der gerade noch zu sehen war. */
332export function scenePictureFor(current: GraphData | undefined, stale: GraphData | undefined, layout: GraphData | undefined): GraphData | undefined {
333 if (current && current.nodes.length > 0) return current;
334 if (stale && stale.nodes.length > 0) return stale;
335 return layout;
336}
337
338export function limitGraphRender(data: GraphData, nodeLimit: number, edgeLimit: number, required: ReadonlySet<number> = new Set()): GraphData {
339 const nodes = [...data.nodes.filter(node => required.has(node.id)), ...data.nodes.filter(node => !required.has(node.id))]

Callers 2

GalaxyPanelFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected