(sessions: Session.Info[])
| 121 | } |
| 122 | |
| 123 | function formatSessionJSON(sessions: Session.Info[]): string { |
| 124 | const jsonData = sessions.map((session) => ({ |
| 125 | id: session.id, |
| 126 | title: session.title, |
| 127 | updated: session.time.updated, |
| 128 | created: session.time.created, |
| 129 | projectId: session.projectID, |
| 130 | directory: session.directory, |
| 131 | })) |
| 132 | return JSON.stringify(jsonData, null, 2) |
| 133 | } |