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

Function addTag

cli/knowledge_graph.go:193–199  ·  view source on GitHub ↗
(g *knowledge.Graph, label string)

Source from the content-addressed store, hash-verified

191func tagID(s string) string { return "tag:" + graphSlug(s) }
192
193func addTag(g *knowledge.Graph, label string) {
194 label = strings.TrimSpace(label)
195 if label == "" {
196 return
197 }
198 g.AddNode(knowledge.Node{ID: tagID(label), Kind: knowledge.KindTag, Title: label})
199}
200
201// graphTitle turns a fact's content into a short node title (first line, capped).
202func graphTitle(content string) string {

Callers 2

addMemoryNodesMethod · 0.85
addSkillNodesMethod · 0.85

Calls 2

tagIDFunction · 0.85
AddNodeMethod · 0.80

Tested by

no test coverage detected