MCPcopy Create free account
hub / github.com/diillson/chatcli / buildKnowledgeGraph

Method buildKnowledgeGraph

cli/knowledge_graph.go:61–67  ·  view source on GitHub ↗

buildKnowledgeGraph assembles the graph from the live stores. Safe to call with a nil memory store or persona handler — it simply yields a smaller graph.

()

Source from the content-addressed store, hash-verified

59// buildKnowledgeGraph assembles the graph from the live stores. Safe to call
60// with a nil memory store or persona handler — it simply yields a smaller graph.
61func (cli *ChatCLI) buildKnowledgeGraph() *knowledge.Graph {
62 g := knowledge.New()
63 cli.addMemoryNodes(g)
64 cli.addSkillNodes(g)
65 linkWikilinks(g)
66 return g
67}
68
69func (cli *ChatCLI) addMemoryNodes(g *knowledge.Graph) {
70 if cli.memoryStore == nil {

Callers 6

graphIndexBlockMethod · 0.95
graphMapTextMethod · 0.95
graphNeighborsTextMethod · 0.95
handleGraphCommandMethod · 0.95
KnowledgeGraphMethod · 0.80
TestBuildKnowledgeGraphFunction · 0.80

Calls 4

addMemoryNodesMethod · 0.95
addSkillNodesMethod · 0.95
NewFunction · 0.92
linkWikilinksFunction · 0.85

Tested by 1

TestBuildKnowledgeGraphFunction · 0.64