diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index d813f40f..c878476b 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -1589,6 +1589,11 @@ export const en = { created_at: 'Created At', updated_at: 'Last Updated', fullScreen: 'Full Screen', + role: 'Role', + domain: 'Domain', + expertise: 'Expertise', + interests: 'Interests', + knowledge_tags: 'Knowledge Tags', memoryWindow: "{{name}}'s Memory Overview", memory_insight: 'Overall Overview', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index fc846dcd..da80fed2 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -1550,6 +1550,11 @@ export const zh = { created_at: '创建时间', updated_at: '最后更新时间', fullScreen: '全屏', + role: '角色', + domain: '领域', + expertise: '专业擅长', + interests: '兴趣爱好', + knowledge_tags: '知识标签', memoryWindow: "{{name}} 的记忆之窗", memory_insight: '总体概述', diff --git a/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx b/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx index c689bf72..cef88637 100644 --- a/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx +++ b/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:33:30 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-27 11:11:09 + * @Last Modified time: 2026-04-10 18:40:52 */ /** * End User Profile Component @@ -22,6 +22,7 @@ import { } from '@/api/memory' import EndUserProfileModal from './EndUserProfileModal' import type { EndUser, EndUserProfileModalRef, EndUserProfileRef } from '../types' +import Tag from '@/components/Tag'; /** * Component props @@ -56,14 +57,6 @@ const EndUserProfile = forwardRef(({ cla setLoading(false) }) } - /** Format profile items for display */ - const formatItems = useCallback(() => { - return ['other_name'].map(key => ({ - key, - label: t(`userMemory.${key}`), - children: String(data?.[key as keyof EndUser] || '-'), - })) - }, [data]) /** Open edit modal */ const handleEdit = () => { if (!data) return @@ -89,13 +82,31 @@ const EndUserProfile = forwardRef(({ cla > {loading ? - : - {formatItems().map(vo => ( -
-
{vo.label}
-
{vo.children}
-
- ))} + : +
+
{t('userMemory.other_name')}
+
{data?.other_name || '-'}
+
+
+
{t('userMemory.role')}
+
{data?.profile?.role || '-'}
+
+
+
{t('userMemory.domain')}
+
{data?.profile?.domain || '-'}
+
+
+
{t('userMemory.expertise')}
+
{data?.profile?.expertise?.join(' | ') || '-'}
+
+
+
{t('userMemory.interests')}
+
{data?.profile?.interests?.join(' | ') || '-'}
+
+
+
{t('userMemory.knowledge_tags')}
+ {data?.knowledge_tags?.map((tag: string) => {tag}) || '-'} +
{t('userMemory.updated_at')}: {data?.updated_at ? dayjs(data?.updated_at).format('YYYY/MM/DD HH:mm:ss') : ''} diff --git a/web/src/views/UserMemoryDetail/types.ts b/web/src/views/UserMemoryDetail/types.ts index 9e56bb5d..b085efde 100644 --- a/web/src/views/UserMemoryDetail/types.ts +++ b/web/src/views/UserMemoryDetail/types.ts @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:57:15 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 17:58:54 + * @Last Modified time: 2026-04-10 18:38:49 */ /** * User Memory Detail Types @@ -176,6 +176,23 @@ export interface EndUser { end_user_id: string; created_at: string; updated_at: string; + profile: { + role: string; + domain: string; + expertise: string[]; + interests: string[]; + }; + _updated_at: { + profile: string; + knowledge_tags: string; + behavioral_hints: string; + }; + knowledge_tags: string[]; + behavioral_hints: { + learning_stage: string; + preferred_depth: string; + tone_preference: string; + }; } /** * End user profile modal ref