MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / createSummaryEntry

Function createSummaryEntry

src/core/compaction.ts:205–223  ·  view source on GitHub ↗
(
  summaryText: string,
  sessionId: string,
  parentUuid: string,
)

Source from the content-addressed store, hash-verified

203
204/** Create the summary user entry that follows a compact_boundary. */
205export function createSummaryEntry(
206 summaryText: string,
207 sessionId: string,
208 parentUuid: string,
209): SessionEntry {
210 return {
211 type: 'user',
212 message: {
213 role: 'user',
214 content: `This session is being continued from a previous conversation. The summary below covers the earlier portion of the conversation.\n\n${summaryText}`,
215 },
216 uuid: randomUUID(),
217 parentUuid,
218 sessionId,
219 timestamp: new Date().toISOString(),
220 provider: 'compaction',
221 isCompactSummary: true,
222 }
223}
224
225// ==================== Orchestrator ====================
226

Callers 3

compaction.spec.tsFile · 0.85
compactIfNeededFunction · 0.85
forceCompactFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected