MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / listRecentSessions

Method listRecentSessions

src/session/store.ts:259–268  ·  view source on GitHub ↗
(limit = 20, cwd?: string)

Source from the content-addressed store, hash-verified

257 if (hasUserMessage) {
258 this.updateSessionWithTurn.run(usage.input, usage.output, usage.costUsd, title ?? null, sessionId);
259 } else {
260 this.updateSessionNoTurn.run(usage.input, usage.output, usage.costUsd, sessionId);
261 }
262 });
263 tx();
264 }
265
266 private getCurrentTurnNumber(sessionId: string): number {
267 const row = this.db.prepare(
268 `SELECT MAX(turn_number) as max FROM messages WHERE session_id = ?`,
269 ).get(sessionId) as { max: number | null };
270 return row.max ?? 0;
271 }

Callers 5

index.tsFile · 0.80
handleSlashCommandFunction · 0.80
gatherDashboardDataFunction · 0.80
listSessionsMethod · 0.80
resumeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected