MCPcopy Index your code
hub / github.com/coder/coder / chatFields

Function chatFields

agent/agentchat/log.go:74–85  ·  view source on GitHub ↗
(chatID uuid.UUID, ancestorIDs []uuid.UUID)

Source from the content-addressed store, hash-verified

72}
73
74func chatFields(chatID uuid.UUID, ancestorIDs []uuid.UUID) []slog.Field {
75 fields := []slog.Field{slog.F("chat_id", chatID.String())}
76 if len(ancestorIDs) == 0 {
77 return fields
78 }
79
80 ancestors := make([]string, 0, len(ancestorIDs))
81 for _, id := range ancestorIDs {
82 ancestors = append(ancestors, id.String())
83 }
84 return append(fields, slog.F("ancestor_chat_ids", ancestors))
85}

Callers 2

FieldsFunction · 0.85
MiddlewareFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected