fix(web): user memory

This commit is contained in:
zhaoying
2026-01-12 18:44:09 +08:00
parent 18d4a5e865
commit ea944d0ee2
10 changed files with 241 additions and 18 deletions

View File

@@ -72,7 +72,7 @@ const ExplicitDetailModal = forwardRef<ExplicitDetailModalRef>((_props, ref) =>
onCancel={handleClose}
>
{loading ? <Skeleton active />
: <Descriptions column={data.memory_type === 'semantic' ? 1 : 2} classNames={{ label: 'rb:w-20' }}>
: <Descriptions column={1} classNames={{ label: 'rb:w-20' }}>
{data.emotion && <Descriptions.Item label={t('explicitDetail.emotion')}>
<div className="rb:flex rb:items-center rb:gap-2">
<div className="rb:w-3 rb:h-3 rb:rounded-full" style={{ backgroundColor: getEmotionColor(data.emotion) }}></div>
@@ -88,7 +88,7 @@ const ExplicitDetailModal = forwardRef<ExplicitDetailModalRef>((_props, ref) =>
{data.created_at && <Descriptions.Item label={t('explicitDetail.created_at')}>
{formatDateTime(data.created_at)}
</Descriptions.Item>}
{data.content && <Descriptions.Item span="filled" label={t('explicitDetail.content')}>
{data.content && <Descriptions.Item label={t('explicitDetail.content')}>
{data.content}
</Descriptions.Item>}
</Descriptions>

View File

@@ -8,6 +8,7 @@ import 'echarts-wordcloud'
import Empty from '@/components/Empty'
import RbCard from '@/components/RbCard/Card'
import { getImplicitPreferences } from '@/api/memory'
import detailEmpty from '@/assets/images/userMemory/detail_empty.png'
interface PreferenceItem {
tag_name: string;
@@ -164,7 +165,12 @@ const Preferences: FC = () => {
bodyClassName='rb:p-3! rb:h-[326px]'
>
{selectedWord === null
? <Empty size={88} className="rb:h-full!" />
? <Empty
url={detailEmpty}
subTitle={t('implicitDetail.wordEmpty')}
className="rb:h-full rb:mx-10 rb:text-center"
size={[197.81, 150]}
/>
: <>
<div className="rb:leading-5 rb:mb-1 rb:font-medium">{t('implicitDetail.context_details')}</div>
<div className="rb:text-[#5B6167] rb:leading-5 rb:font-regular">{data[selectedWord].context_details}</div>