Skip to content

Commit 6677dd3

Browse files
committed
feat: hide query nodes from knowledge graph
Filter out type:query pages (research results, saved chat answers) from graph visualization. These are intermediate artifacts — the entities and concepts extracted from them via auto-ingest are the real knowledge nodes.
1 parent 7a7f3aa commit 6677dd3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/lib/wiki-graph.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ export async function buildWikiGraph(
198198
})
199199
}
200200

201+
// Filter out query nodes (research results, saved chat answers) — they are
202+
// intermediate artifacts, not knowledge structure. The entities/concepts
203+
// extracted from them via auto-ingest are what belong in the graph.
204+
const HIDDEN_TYPES = new Set(["query"])
205+
for (const [id, node] of nodeMap) {
206+
if (HIDDEN_TYPES.has(node.type)) {
207+
nodeMap.delete(id)
208+
}
209+
}
210+
201211
// Count link references
202212
const linkCounts = new Map<string, number>()
203213
for (const [id] of nodeMap) {

0 commit comments

Comments
 (0)