MCPcopy
hub / github.com/claude-code-best/claude-code / logEntryToHistoryEntry

Function logEntryToHistoryEntry

src/history.ts:265–279  ·  view source on GitHub ↗

* Convert LogEntry to HistoryEntry by resolving paste store references.

(entry: LogEntry)

Source from the content-addressed store, hash-verified

263 * Convert LogEntry to HistoryEntry by resolving paste store references.
264 */
265async 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
281let pendingEntries: LogEntry[] = []
282let isWriting = false

Callers 3

makeHistoryReaderFunction · 0.85
getTimestampedHistoryFunction · 0.85
getHistoryFunction · 0.85

Calls 2

entriesMethod · 0.80

Tested by

no test coverage detected