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

Method append

src/core/session.ts:261–272  ·  view source on GitHub ↗
(partial: Omit<SessionEntry, 'uuid' | 'parentUuid' | 'sessionId' | 'timestamp'>)

Source from the content-addressed store, hash-verified

259 }
260
261 private append(partial: Omit<SessionEntry, 'uuid' | 'parentUuid' | 'sessionId' | 'timestamp'>): SessionEntry {
262 const entry: SessionEntry = {
263 ...partial,
264 uuid: randomUUID(),
265 parentUuid: this.lastUuid,
266 sessionId: this.sessionId,
267 timestamp: new Date().toISOString(),
268 }
269 this.entries.push(entry)
270 this.lastUuid = entry.uuid
271 return entry
272 }
273}
274
275// ==================== Format Conversion ====================

Callers 2

appendUserMethod · 0.95
appendAssistantMethod · 0.95

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected