feat(web): neo4j type user memory detail

This commit is contained in:
zhaoying
2025-12-26 19:14:26 +08:00
parent 7dd4db52df
commit e11c1bb233
23 changed files with 516 additions and 280 deletions

View File

@@ -17,11 +17,11 @@ const MemoryInsight = forwardRef<MemoryInsightRef>((_props, ref) => {
useEffect(() => {
if (!id) return
getInsightReport()
getData()
}, [id])
// 记忆洞察
const getInsightReport = () => {
const getData = () => {
if (!id) return
setLoading(true)
getMemoryInsightReport(id).then((res) => {
@@ -34,23 +34,18 @@ const MemoryInsight = forwardRef<MemoryInsightRef>((_props, ref) => {
}
// 暴露给父组件的方法
useImperativeHandle(ref, () => ({
getInsightReport,
getData,
}));
return (
<RbCard
title={t('userMemory.memoryInsight')}
headerType="borderless"
headerClassName="rb:text-[18px]! rb:leading-[24px]"
bgColor="linear-gradient(180deg,#F1F9FE 0%, #FBFCFF 100%)"
height="100%"
>
{loading
? <Skeleton />
: report
? <div className="rb:flex rb:flex-wrap rb:justify-between rb:h-full">
<div className="rb:leading-5.5">
{report|| '-'}
</div>
? <div className="rb:bg-[#F6F8FC] rb:border rb:border-[#DFE4ED] rb:rounded-lg rb:py-3 rb:px-4 rb:text-[#5B6167] rb:leading-5">
{report || '-'}
</div>
: <Empty size={80} />
}