MCPcopy Create free account
hub / github.com/WJX20/claude-code / recordContextCollapseCommit

Function recordContextCollapseCommit

src/utils/sessionStorage.ts:1542–1557  ·  view source on GitHub ↗
(commit: {
  collapseId: string
  summaryUuid: string
  summaryContent: string
  summary: string
  firstArchivedUuid: string
  lastArchivedUuid: string
})

Source from the content-addressed store, hash-verified

1540 * array and handed to restoreFromEntries() which rebuilds the commit log.
1541 */
1542export async function recordContextCollapseCommit(commit: {
1543 collapseId: string
1544 summaryUuid: string
1545 summaryContent: string
1546 summary: string
1547 firstArchivedUuid: string
1548 lastArchivedUuid: string
1549}): Promise<void> {
1550 const sessionId = getSessionId() as UUID
1551 if (!sessionId) return
1552 await getProject().appendEntry({
1553 type: 'marble-origami-commit',
1554 sessionId,
1555 ...commit,
1556 })
1557}
1558
1559/**
1560 * Snapshot the staged queue + spawn state. Written after each ctx-agent

Callers

nothing calls this directly

Calls 3

getSessionIdFunction · 0.85
getProjectFunction · 0.85
appendEntryMethod · 0.80

Tested by

no test coverage detected