diff --git a/web/src/views/Home/components/TopCardList.tsx b/web/src/views/Home/components/TopCardList.tsx
index 751f232a..25f11a55 100644
--- a/web/src/views/Home/components/TopCardList.tsx
+++ b/web/src/views/Home/components/TopCardList.tsx
@@ -15,49 +15,22 @@ import { useTranslation } from 'react-i18next'
import clsx from 'clsx';
import { Flex } from 'antd';
-import totalMemoryCapacity from '@/assets/images/home/totalMemoryCapacity.svg';
-import userMemory from '@/assets/images/home/userMemory.svg';
-import knowledgeBaseCount from '@/assets/images/home/knowledgeBaseCount.svg';
-import apiCallCount from '@/assets/images/home/apiCallCount.svg';
import type { DashboardData } from '../index'
/** Card configuration with styling */
const list = [
{
- key: 'totalMemoryCapacity',
- icon: totalMemoryCapacity,
- // value: '45,678',
- // trendValue: '12.5%',
- // trend: 'up',
- // trendDesc: 'comparedToYesterday',
+ key: 'total_memory',
background: 'rb:bg-[url("@/assets/images/home/totalMemoryCapacity.png")] rb:bg-cover rb:bg-no-repeat',
},
{
- key: 'application',
- icon: userMemory,
- // value: '32,145',
- // trendValue: '12.5%',
- // trend: 'down',
- // trendDesc: 'comparedToYesterday',
- // background: 'linear-gradient( 180deg, #F1FBF5 0%, #F9FDFF 100%)',
+ key: 'total_app',
},
{
- key: 'knowledgeBaseCount',
- icon: knowledgeBaseCount,
- // value: '13,533',
- // trendValue: '15.7%',
- // trend: 'up',
- // trendDesc: 'thisWeek',
- // background: 'linear-gradient( 180deg, #E6F5FE 0%, #FBFDFF 100%)',
+ key: 'total_knowledge',
},
{
- key: 'apiCallCount',
- icon: apiCallCount,
- // value: '856.2k',
- // trendValue: '23.1%',
- // trend: 'up',
- // trendDesc: 'comparedToYesterday',
- // background: 'linear-gradient( 180deg, #F8F6F5 0%, #FAFDFF 100%)',
+ key: 'total_api_call',
},
]
/**
@@ -75,30 +48,32 @@ const TopCardList: FC<{data?: DashboardData}> = ({ data }) => {
className={`rb:rounded-2xl rb:bg-[#FFFFFF] rb:py-4 rb:px-3 ${item.background || ''}`}
>
{t(`dashboard.${item.key}`)}
{data?.[item.key as keyof DashboardData] || 0}
= 0,
})}>
- 0%
+ {data?.[`${item.key}_change` as keyof DashboardData] && data?.[item.key as keyof DashboardData] > 0
+ ? (100 * data?.[`${item.key}_change` as keyof DashboardData] / data?.[item.key as keyof DashboardData]).toFixed(2)
+ : 0
+ }%
= 0,
})}>
{t('dashboard.comparedToYesterday')}
diff --git a/web/src/views/Home/index.tsx b/web/src/views/Home/index.tsx
index 2844b816..ae2c89fa 100644
--- a/web/src/views/Home/index.tsx
+++ b/web/src/views/Home/index.tsx
@@ -25,14 +25,18 @@ import ApiLineCard from './components/ApiLineCard'
* Dashboard statistics data
*/
export interface DashboardData {
- totalMemoryCapacity?: number;
- application?: number;
- knowledgeBaseCount?: number;
- apiCallCount?: number;
+ total_memory: number;
+ total_app: number;
+ total_knowledge: number;
+ total_api_call: number;
+ total_memory_change: number;
+ total_app_change: number;
+ total_knowledge_change: number;
+ total_api_call_change: number;
}
const Home = () => {
- const [dashboardData, setDashboardData] = useState
({});
+ const [dashboardData, setDashboardData] = useState({} as DashboardData);
const [loading, setLoading] = useState({
knowledgeTypeDistribution: true,
});
@@ -65,12 +69,7 @@ const Home = () => {
}
const { storage_type = 'neo4j' } = response || {}
const responseData = storage_type === 'neo4j' ? response.neo4j_data : response.rag_data
- setDashboardData({
- totalMemoryCapacity: responseData?.total_memory || 0,
- application: responseData?.total_app || 0,
- knowledgeBaseCount: responseData?.total_knowledge || 0,
- apiCallCount: responseData?.total_api_call || 0
- })
+ setDashboardData(responseData as DashboardData)
})
}
/** Fetch knowledge base type distribution */
diff --git a/web/src/views/Index/components/QuickActions.tsx b/web/src/views/Index/components/QuickActions.tsx
index e9f1f4f8..ceee204f 100644
--- a/web/src/views/Index/components/QuickActions.tsx
+++ b/web/src/views/Index/components/QuickActions.tsx
@@ -2,13 +2,9 @@ import { type FC } from 'react';
import { useTranslation } from 'react-i18next';
import { Flex } from 'antd'
-import modelIcon from '@/assets/images/index/model_mgt.svg'
-import spaceIcon from '@/assets/images/index/space_mgt.svg'
-import userIcon from '@/assets/images/index/user_mgt.svg'
-import helpCenterIcon from '@/assets/images/index/help_center.svg'
interface QuickAction {
key: string;
- icon: string;
+ iconClass: string;
title: string;
onClick?: () => void;
}
@@ -40,50 +36,25 @@ const QuickActions: FC = ({ onNavigate }) => {
const quickActions: QuickAction[] = [
{
key: 'model-management',
- icon: modelIcon,
+ iconClass: "rb:bg-[url('@/assets/images/index/model_mgt.svg')]",
title: t('quickActions.modelManagement'),
onClick: () => onNavigate?.('/model')
},
{
key: 'space-management',
- icon: spaceIcon,
+ iconClass: "rb:bg-[url('@/assets/images/index/space_mgt.svg')]",
title: t('quickActions.spaceManagement'),
onClick: () => onNavigate?.('/space')
},
- // {
- // key: 'workflow-orchestration',
- // icon: workflowIcon,
- // title: t('quickActions.workflowOrchestration'),
- // onClick: () => onNavigate?.('/workflow')
- // },
{
key: 'user-management',
- icon: userIcon,
+ iconClass: "rb:bg-[url('@/assets/images/index/user_mgt.svg')]",
title: t('quickActions.userManagement'),
onClick: () => onNavigate?.('/user-management')
},
- // {
- // key: 'data-export',
- // icon: dataExportIcon,
- // title: t('quickActions.dataExport'),
- // onClick: () => onNavigate?.('/')
- // },
- // {
- // key: 'log-query',
- // icon: logIcon,
- // title: t('quickActions.logQuery'),
- // onClick: () => onNavigate?.('/log')
- // },
- // {
- // key: 'notification-reminder',
- // icon: noteIcon,
- // title: t('quickActions.notificationReminder'),
- // onClick: () => onNavigate?.('/notification-reminder')
- // },
-
{
key: 'help-center',
- icon: helpCenterIcon,
+ iconClass: "rb:bg-[url('@/assets/images/index/help_center.svg')]",
title: t('quickActions.helpCenter'),
onClick: openHelpCenter
}
@@ -105,7 +76,7 @@ const QuickActions: FC = ({ onNavigate }) => {
className="rb:cursor-pointer"
onClick={action.onClick}
>
-
+
{action.title}
diff --git a/web/src/views/Index/index.tsx b/web/src/views/Index/index.tsx
index e5a5494a..ee124c55 100644
--- a/web/src/views/Index/index.tsx
+++ b/web/src/views/Index/index.tsx
@@ -102,7 +102,7 @@ const Index = () => {
-
+
{t('index.spaceTitle')}
diff --git a/web/src/views/MemoryConversation/index.tsx b/web/src/views/MemoryConversation/index.tsx
index 5aace0a8..a5f3592e 100644
--- a/web/src/views/MemoryConversation/index.tsx
+++ b/web/src/views/MemoryConversation/index.tsx
@@ -10,9 +10,9 @@
* Supports deep thinking, normal reply, and quick reply modes
*/
-import { type FC, type ReactNode, useState, useEffect } from 'react'
+import { type FC, type ReactNode, useState } from 'react'
import { useTranslation } from 'react-i18next'
-import { Col, Row, App, Skeleton, Segmented, Tooltip, Flex } from 'antd'
+import { Col, Row, App, Skeleton, Segmented, Tooltip, Flex, Image } from 'antd'
import dayjs from 'dayjs'
import type { AnyObject } from 'antd/es/_util/type';
@@ -29,6 +29,8 @@ import type { ChatItem } from '@/components/Chat/types'
import RbCard from '@/components/RbCard/Card';
import styles from './index.module.css'
import ResultCard from '@/components/RbCard/ResultCard'
+import AudioPlayer from '@/views/UserMemoryDetail/components/AudioPlayer'
+import VideoPlayer from '@/views/UserMemoryDetail/components/VideoPlayer'
/** Search mode configuration */
@@ -92,6 +94,7 @@ export interface LogItem {
result?: string;
original_query: string;
index?: number;
+ result_count?: number;
}
/**
@@ -144,6 +147,10 @@ const MemoryConversation: FC = () => {
const handleChange = (value: string) => {
setSearchSwitch(value)
}
+ const handleDownload = (file_path?: string) => {
+ if (!file_path) return
+ window.open(file_path, '_blank')
+ }
return (
<>
@@ -168,7 +175,7 @@ const MemoryConversation: FC = () => {
-
+
{
-
+
{
<>
{vo.id}. {vo.question}
- {vo.reason}
+ {vo.reason}
>
))}
@@ -247,7 +254,7 @@ const MemoryConversation: FC = () => {
<>
{key}
{(log.data as Record)[key].map((item, index) => (
- {item}
+ {item}
))}
>
@@ -257,16 +264,16 @@ const MemoryConversation: FC = () => {
?
{log.query}
{(log.raw_results.reranked_results as AnyObject)?.communities?.length > 0 && <>
- {t('memoryConversation.communities')}
-
+ {t('memoryConversation.communities')}
+
{((log.raw_results.reranked_results as AnyObject)?.communities as { content: string }[]).map((item, index: number) => (
- {item.content}
))}
>}
{(log.raw_results.reranked_results as AnyObject)?.summaries?.length > 0 && <>
- {t('memoryConversation.summaries')}
-