MCPcopy Create free account
hub / github.com/zxlie/FeHelper / loadUsageData

Function loadUsageData

apps/background/statistics.js:87–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 * @returns {Promise<void>}
86 */
87 const loadUsageData = async () => {
88 try {
89 const data = await Awesome.StorageMgr.get(USER_USAGE_DATA_KEY);
90 if (data) {
91 usageData = normalizeUsageData(JSON.parse(data));
92 } else {
93 usageData = normalizeUsageData(usageData);
94 }
95 } catch (error) {
96 console.error('加载使用数据失败:', error);
97 usageData = normalizeUsageData(usageData);
98 }
99 };
100
101 /**
102 * 保存使用数据到本地存储

Callers 3

initFunction · 0.85
getRecentUsedToolsFunction · 0.85
getDashboardDataFunction · 0.85

Calls 3

normalizeUsageDataFunction · 0.85
getMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected