MCPcopy Create free account
hub / github.com/allocnode/oh-my-sage / updateSessionMeta

Method updateSessionMeta

src/server/session/store.ts:292–304  ·  view source on GitHub ↗

* 更新 session 元数据

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

Source from the content-addressed store, hash-verified

290 * 更新 Session 元数据
291 */
292 async updateSessionMeta(sessionId: string, updates: Partial<SessionMeta>): Promise<void> {
293 const index = this.readIndex();
294 const sessionIndex = index.sessions.findIndex(s => s.id === sessionId);
295
296 if (sessionIndex >= 0) {
297 index.sessions[sessionIndex] = {
298 ...index.sessions[sessionIndex],
299 ...updates,
300 updatedAt: new Date().toISOString(),
301 };
302 this.writeIndex(index);
303 }
304 }
305
306 /**
307 * 删除 Session

Callers 1

PATCHFunction · 0.80

Calls 2

readIndexMethod · 0.95
writeIndexMethod · 0.95

Tested by

no test coverage detected