MCPcopy Create free account
hub / github.com/codeaashu/claude-code / countByUser

Method countByUser

src/server/web/session-store.ts:175–181  ·  view source on GitHub ↗

How many sessions are owned by the given user.

(userId: string)

Source from the content-addressed store, hash-verified

173
174 /** How many sessions are owned by the given user. */
175 countByUser(userId: string): number {
176 let n = 0;
177 for (const s of this.sessions.values()) {
178 if (s.userId === userId) n++;
179 }
180 return n;
181 }
182
183 /** Returns all raw StoredSession objects (used internally by SessionManager). */
184 getAll(): StoredSession[] {

Callers 1

Calls 1

valuesMethod · 0.80

Tested by

no test coverage detected