From 68c4c7429c5f8523e34774bde35bbdd6ff5f168c Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 4 Mar 2026 10:59:29 +0800 Subject: [PATCH] feat(web): change interest distribution api --- web/src/api/memory.ts | 8 ++++---- .../UserMemoryDetail/components/InterestDistribution.tsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/api/memory.ts b/web/src/api/memory.ts index 987ef358..ef7aa460 100644 --- a/web/src/api/memory.ts +++ b/web/src/api/memory.ts @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 14:00:06 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 14:00:06 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-04 10:58:41 */ import { request } from '@/utils/request' import type { @@ -98,8 +98,8 @@ export const getMemorySearchEdges = (end_user_id: string) => { return request.get(`/memory-storage/analytics/graph_data`, { end_user_id }) } // User Memory - User interest distribution -export const getHotMemoryTagsByUser = (end_user_id: string) => { - return request.get(`/memory/analytics/hot_memory_tags/by_user`, { end_user_id }) +export const getInterestDistributionByUser = (end_user_id: string) => { + return request.get(`/memory/analytics/interest_distribution/by_user`, { end_user_id }) } // User Memory - Total memory count export const getTotalMemoryCountByUser = (end_user_id: string) => { diff --git a/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx b/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx index d48013b3..849e1eb2 100644 --- a/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx +++ b/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx @@ -15,7 +15,7 @@ import { useParams } from 'react-router-dom' import ReactEcharts from 'echarts-for-react'; import { Space } from 'antd' -import { getHotMemoryTagsByUser } from '@/api/memory'; +import { getInterestDistributionByUser } from '@/api/memory'; import Empty from '@/components/Empty'; import Loading from '@/components/Empty/Loading'; import RbCard from '@/components/RbCard/Card'; @@ -38,7 +38,7 @@ const InterestDistribution: FC = () => { /** Fetch interest distribution data */ const getData = () => { setLoading(true) - getHotMemoryTagsByUser(id as string).then(res => { + getInterestDistributionByUser(id as string).then(res => { const response = res as { name: string; frequency: number }[] setData(response.map(item => ({ ...item,