MCPcopy Index your code
hub / github.com/continuedev/continue / syncUsageFromSession

Method syncUsageFromSession

extensions/cli/src/session.ts:188–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186 }
187
188 private syncUsageFromSession(): void {
189 const session = this.currentSession;
190 if (session?.usage) {
191 this.sessionUsage = { ...session.usage };
192 } else {
193 // Migrate old sessions that only had totalCost
194 this.sessionUsage = {
195 totalCost: 0,
196 promptTokens: 0,
197 completionTokens: 0,
198 promptTokensDetails: {
199 cachedTokens: 0,
200 cacheWriteTokens: 0,
201 },
202 };
203 }
204 }
205}
206
207function getCurrentSessionId(): string {

Callers 1

setSessionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected