MCPcopy Create free account
hub / github.com/compozy/agh / networkDirectBundle

Function networkDirectBundle

internal/cli/network.go:1542–1576  ·  view source on GitHub ↗
(direct NetworkDirectRoomRecord)

Source from the content-addressed store, hash-verified

1540}
1541
1542func networkDirectBundle(direct NetworkDirectRoomRecord) outputBundle {
1543 return outputBundle{
1544 jsonValue: contract.NetworkDirectRoomResponse{Direct: direct},
1545 human: func() (string, error) {
1546 return renderHumanSection("Network Direct Room", networkDirectKeyValues(direct)), nil
1547 },
1548 toon: func() (string, error) {
1549 return renderToonObject(
1550 "network_direct",
1551 []string{
1552 networkChannelKey,
1553 networkDirectIDKey,
1554 "peer_a",
1555 "peer_b",
1556 networkOpenedAtKey,
1557 networkLastActivityAtKey,
1558 networkMessageCountKey,
1559 networkOpenWorkCountKey,
1560 networkLastMessagePreviewKey,
1561 },
1562 []string{
1563 direct.Channel,
1564 direct.DirectID,
1565 direct.PeerA,
1566 direct.PeerB,
1567 formatTimePtr(direct.OpenedAt),
1568 formatTimePtr(direct.LastActivityAt),
1569 strconv.Itoa(direct.MessageCount),
1570 strconv.Itoa(direct.OpenWorkCount),
1571 direct.LastMessagePreview,
1572 },
1573 ), nil
1574 },
1575 }
1576}
1577
1578func networkDirectMessagesBundle(messages []NetworkConversationMessageRecord) outputBundle {
1579 return networkMessagesBundle(contract.NetworkDirectRoomMessagesResponse{Messages: messages}, messages)

Callers 2

Calls 4

renderHumanSectionFunction · 0.85
networkDirectKeyValuesFunction · 0.85
renderToonObjectFunction · 0.85
formatTimePtrFunction · 0.85

Tested by

no test coverage detected