MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / removeSession

Method removeSession

packages/sync/src/data-source-manager.ts:169–178  ·  view source on GitHub ↗
(sourceId: string, sessionId: string)

Source from the content-addressed store, hash-verified

167 }
168
169 removeSession(sourceId: string, sessionId: string): ImportSession | null {
170 const sources = this.loadAll()
171 const ds = sources.find((s) => s.id === sourceId)
172 if (!ds) return null
173 const removed = ds.sessions.find((s) => s.id === sessionId)
174 if (!removed) return null
175 ds.sessions = ds.sessions.filter((s) => s.id !== sessionId)
176 this.saveAll(sources)
177 return removed
178 }
179
180 updateSession(sourceId: string, sessionId: string, updates: Partial<ImportSession>): ImportSession | null {
181 const sources = this.loadAll()

Callers 2

registerApiHandlersFunction · 0.80
registerAutomationRoutesFunction · 0.80

Calls 2

loadAllMethod · 0.95
saveAllMethod · 0.95

Tested by

no test coverage detected