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

Function chatMessageParts

coderd/database/db2sdk/db2sdk.go:1650–1660  ·  view source on GitHub ↗
(m database.ChatMessage)

Source from the content-addressed store, hash-verified

1648}
1649
1650func chatMessageParts(m database.ChatMessage) ([]codersdk.ChatMessagePart, error) {
1651 parts, err := chatprompt.ParseContent(m)
1652 if err != nil {
1653 return nil, err
1654 }
1655 // Strip internal-only fields before API responses.
1656 for i := range parts {
1657 parts[i].StripInternal()
1658 }
1659 return parts, nil
1660}
1661
1662func nullUUIDPtr(v uuid.NullUUID) *uuid.UUID {
1663 if !v.Valid {

Callers 2

ChatMessageFunction · 0.85
ChatQueuedMessageFunction · 0.85

Calls 2

ParseContentFunction · 0.92
StripInternalMethod · 0.80

Tested by

no test coverage detected