MCPcopy
hub / github.com/Dimillian/CodexMonitor / appendThread

Function appendThread

src/features/app/hooks/useThreadRows.ts:109–117  ·  view source on GitHub ↗
(
        thread: ThreadSummary,
        depth: number,
        rows: ThreadRow[],
      )

Source from the content-addressed store, hash-verified

107 const visibleRoots = unpinnedRoots.slice(0, visibleRootCount);
108
109 const appendThread = (
110 thread: ThreadSummary,
111 depth: number,
112 rows: ThreadRow[],
113 ) => {
114 rows.push({ thread, depth });
115 const children = childrenByParent.get(thread.id) ?? [];
116 children.forEach((child) => appendThread(child, depth + 1, rows));
117 };
118
119 const pinnedRows: ThreadRow[] = [];
120 pinnedRoots.forEach((thread) => appendThread(thread, 0, pinnedRows));

Callers 1

useThreadRowsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected