MCPcopy Index your code
hub / github.com/anomalyco/opencode / formatSessionJSON

Function formatSessionJSON

packages/opencode/src/cli/cmd/session.ts:137–147  ·  view source on GitHub ↗
(sessions: Session.Info[])

Source from the content-addressed store, hash-verified

135}
136
137function formatSessionJSON(sessions: Session.Info[]): string {
138 const jsonData = sessions.map((session) => ({
139 id: session.id,
140 title: session.title,
141 updated: session.time.updated,
142 created: session.time.created,
143 projectId: session.projectID,
144 directory: session.directory,
145 }))
146 return JSON.stringify(jsonData, null, 2)
147}

Callers 1

session.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected