MCPcopy Create free account
hub / github.com/altic-dev/Pilot / updateSession

Method updateSession

src/lib/session-store.ts:65–83  ·  view source on GitHub ↗

* Update session data

(sessionId: string, updates: Partial<SessionData>)

Source from the content-addressed store, hash-verified

63 * Update session data
64 */
65 updateSession(sessionId: string, updates: Partial<SessionData>): void {
66 const session = this.sessions.get(sessionId);
67 if (!session) {
68 logger.warn(`Attempted to update non-existent session: ${sessionId}`);
69 return;
70 }
71
72 const updatedSession = {
73 ...session,
74 ...updates,
75 lastActivity: Date.now(),
76 };
77
78 this.sessions.set(sessionId, updatedSession);
79 logger.info(`Session updated: ${sessionId}`, updates);
80
81 // Notify subscribers
82 this.notifySubscribers(sessionId, updatedSession);
83 }
84
85 /**
86 * Delete a session

Callers 1

repo-setup.tsFile · 0.80

Calls 1

notifySubscribersMethod · 0.95

Tested by

no test coverage detected