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

Function writeGraphNode

cli/knowledge_graph.go:260–270  ·  view source on GitHub ↗
(b *strings.Builder, n *knowledge.Node)

Source from the content-addressed store, hash-verified

258}
259
260func writeGraphNode(b *strings.Builder, n *knowledge.Node) {
261 title := strings.TrimSpace(n.Title)
262 if title == "" {
263 title = n.ID
264 }
265 if summary := strings.TrimSpace(n.Summary); summary != "" && summary != title {
266 fmt.Fprintf(b, " - [%s] %s — %s\n", n.Kind, title, truncateForLog(summary, 160))
267 } else {
268 fmt.Fprintf(b, " - [%s] %s\n", n.Kind, title)
269 }
270}

Callers 1

graphNeighborsTextMethod · 0.85

Calls 1

truncateForLogFunction · 0.70

Tested by

no test coverage detected