MCPcopy Create free account
hub / github.com/anomalyco/opencode / summaryText

Function summaryText

packages/opencode/src/session/compaction.ts:52–60  ·  view source on GitHub ↗
(message: SessionV1.WithParts)

Source from the content-addressed store, hash-verified

50}
51
52function summaryText(message: SessionV1.WithParts) {
53 const text = message.parts
54 .filter((part): part is SessionV1.TextPart => part.type === "text")
55 .map((part) => part.text.trim())
56 .filter(Boolean)
57 .join("\n\n")
58 .trim()
59 return text || undefined
60}
61
62function completedCompactions(messages: SessionV1.WithParts[]) {
63 const users = new Map<MessageID, number>()

Callers 1

completedCompactionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected