MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / loadAnalysisData

Function loadAnalysisData

src/composables/useSessionAnalysisPageBase.ts:76–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75
76 async function loadAnalysisData() {
77 if (!currentSessionId.value) return
78
79 isLoading.value = true
80
81 try {
82 const filter = timeFilter.value
83
84 const adapter = useDataService()
85 const [members, hourly, daily, types] = await Promise.all([
86 adapter.getMemberActivity(currentSessionId.value, filter),
87 adapter.getHourlyActivity(currentSessionId.value, filter),
88 adapter.getDailyActivity(currentSessionId.value, filter),
89 adapter.getMessageTypeDistribution(currentSessionId.value, filter),
90 ])
91
92 memberActivity.value = members
93 hourlyActivity.value = hourly
94 dailyActivity.value = daily
95 messageTypes.value = types
96 } catch (error) {
97 console.error('加载分析数据失败:', error)
98 } finally {
99 isLoading.value = false
100 }
101 }
102
103 async function loadData() {
104 if (!currentSessionId.value) return

Callers 1

Calls 7

useDataServiceFunction · 0.90
allMethod · 0.65
getMemberActivityMethod · 0.65
getHourlyActivityMethod · 0.65
getDailyActivityMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected