MCPcopy
hub / github.com/codeaashu/claude-code / restoreCostStateForSession

Function restoreCostStateForSession

src/cost-tracker.ts:130–137  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

128 * @returns true if cost state was restored, false otherwise
129 */
130export function restoreCostStateForSession(sessionId: string): boolean {
131 const data = getStoredSessionCosts(sessionId)
132 if (!data) {
133 return false
134 }
135 setCostStateForRestore(data)
136 return true
137}
138
139/**
140 * Saves the current session's costs to project config.

Callers 2

onSelectFunction · 0.85

Calls 2

getStoredSessionCostsFunction · 0.85
setCostStateForRestoreFunction · 0.85

Tested by

no test coverage detected