()
| 11 | |
| 12 | export class HistoryStorage { |
| 13 | static getHistory(): HistoryRecord[] { |
| 14 | if (typeof window === 'undefined') return []; |
| 15 | |
| 16 | try { |
| 17 | const stored = localStorage.getItem(STORAGE_KEY); |
| 18 | return stored ? JSON.parse(stored) : []; |
| 19 | } catch (error) { |
| 20 | console.error('Error reading history from localStorage:', error); |
| 21 | return []; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | static saveRecord(input: string, output: string): string { |
| 26 | if (typeof window === 'undefined') return ''; |
no outgoing calls
no test coverage detected