MCPcopy Create free account
hub / github.com/MatterAIOrg/OrbCode / saveSession

Function saveSession

src/core/sessions.ts:37–41  ·  view source on GitHub ↗
(data: SessionData)

Source from the content-addressed store, hash-verified

35}
36
37export function saveSession(data: SessionData): void {
38 const dir = getSessionsDir()
39 fs.mkdirSync(dir, { recursive: true })
40 fs.writeFileSync(getSessionFilePath(data.id), JSON.stringify(data), { mode: 0o600 })
41}
42
43export function loadSessionById(id: string): SessionData | undefined {
44 try {

Callers 1

persistMethod · 0.85

Calls 2

getSessionsDirFunction · 0.85
getSessionFilePathFunction · 0.85

Tested by

no test coverage detected