* Convert LogEntry to HistoryEntry by resolving paste store references.
(entry: LogEntry)
| 263 | * Convert LogEntry to HistoryEntry by resolving paste store references. |
| 264 | */ |
| 265 | async function logEntryToHistoryEntry(entry: LogEntry): Promise<HistoryEntry> { |
| 266 | const pastedContents: Record<number, PastedContent> = {} |
| 267 | |
| 268 | for (const [id, stored] of Object.entries(entry.pastedContents || {})) { |
| 269 | const resolved = await resolveStoredPastedContent(stored) |
| 270 | if (resolved) { |
| 271 | pastedContents[Number(id)] = resolved |
| 272 | } |
| 273 | } |
| 274 | |
| 275 | return { |
| 276 | display: entry.display, |
| 277 | pastedContents, |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | let pendingEntries: LogEntry[] = [] |
| 282 | let isWriting = false |
no test coverage detected