(partial: Omit<SessionEntry, 'uuid' | 'parentUuid' | 'sessionId' | 'timestamp'>)
| 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 ==================== |
no test coverage detected