(cursor: string)
| 49 | } |
| 50 | |
| 51 | export function decodeCursor(cursor: string): CursorData | null { |
| 52 | try { |
| 53 | const parsed = JSON.parse(Buffer.from(cursor, 'base64').toString()) |
| 54 | if (typeof parsed?.id !== 'string') return null |
| 55 | return parsed as CursorData |
| 56 | } catch { |
| 57 | return null |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Shared logs list query used by the `/api/logs` route and the copilot `query_logs` |
no test coverage detected