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

Function graphTitle

cli/knowledge_graph.go:202–208  ·  view source on GitHub ↗

graphTitle turns a fact's content into a short node title (first line, capped).

(content string)

Source from the content-addressed store, hash-verified

200
201// graphTitle turns a fact's content into a short node title (first line, capped).
202func graphTitle(content string) string {
203 line := strings.TrimSpace(content)
204 if i := strings.IndexByte(line, '\n'); i >= 0 {
205 line = strings.TrimSpace(line[:i])
206 }
207 return truncateForLog(line, 60)
208}
209
210// --- graph access (exposed through the @memory tool: map / neighbors) ---
211

Callers 2

addMemoryNodesMethod · 0.85
TestGraphHelpersFunction · 0.85

Calls 1

truncateForLogFunction · 0.70

Tested by 1

TestGraphHelpersFunction · 0.68