MCPcopy
hub / github.com/guaguaguaxia/weekly_report / getHistory

Method getHistory

utils/historyStorage.ts:13–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12export 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 '';

Callers 5

saveRecordMethod · 0.95
deleteRecordMethod · 0.95
getRecordMethod · 0.95
getGroupedHistoryMethod · 0.95
updateHistoryCountFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected