(row: Record<string, unknown>)
| 174 | } |
| 175 | |
| 176 | function parseRow(row: Record<string, unknown>): Activity { |
| 177 | return { |
| 178 | id: row.id as string, |
| 179 | timestamp: row.timestamp as string, |
| 180 | type: row.type as string, |
| 181 | description: row.description as string, |
| 182 | status: row.status as string, |
| 183 | duration_ms: row.duration_ms as number | null, |
| 184 | tokens_used: row.tokens_used as number | null, |
| 185 | agent: row.agent as string | null, |
| 186 | metadata: row.metadata ? JSON.parse(row.metadata as string) : null, |
| 187 | }; |
| 188 | } |
| 189 | |
| 190 | export function getActivities(opts: GetActivitiesOptions = {}): ActivitiesResult { |
| 191 | const db = getDb(); |
nothing calls this directly
no outgoing calls
no test coverage detected