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

Function graphViewTurnLabel

cli/graphview_adapter.go:216–233  ·  view source on GitHub ↗

graphViewTurnLabel renders a short, role-prefixed label for a turn node.

(role, content string)

Source from the content-addressed store, hash-verified

214
215// graphViewTurnLabel renders a short, role-prefixed label for a turn node.
216func graphViewTurnLabel(role, content string) string {
217 first := content
218 if i := strings.IndexByte(first, '\n'); i >= 0 {
219 first = first[:i]
220 }
221 first = strings.TrimSpace(first)
222 prefix := "•"
223 switch role {
224 case "user":
225 prefix = "▸"
226 case "assistant":
227 prefix = "◆"
228 }
229 if first == "" {
230 first = "(tool call)"
231 }
232 return prefix + " " + truncateForLog(first, 48)
233}

Callers 1

addConversationThreadMethod · 0.85

Calls 1

truncateForLogFunction · 0.70

Tested by

no test coverage detected