graphTitle turns a fact's content into a short node title (first line, capped).
(content string)
| 200 | |
| 201 | // graphTitle turns a fact's content into a short node title (first line, capped). |
| 202 | func 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 |