From 2b9fd33bc85c0cd6abf561c7f7d73a9a69300d20 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Wed, 25 Mar 2026 13:58:25 +0800 Subject: [PATCH] fix(web): ui upgrade --- web/src/components/ModelSelect/index.tsx | 11 ++- web/src/components/SearchInput/index.tsx | 6 +- web/src/components/SiderMenu/index.tsx | 7 +- web/src/i18n/zh.ts | 1 + web/src/styles/index.css | 4 ++ web/src/views/ApplicationConfig/Agent.tsx | 26 ++++--- web/src/views/ApplicationConfig/Api.tsx | 10 +-- .../components/AiPromptModal.tsx | 4 +- .../components/ModelConfigModal.tsx | 23 +++--- .../components/Skill/SkillListModal.tsx | 11 +-- .../views/ApplicationManagement/MySharing.tsx | 14 ++-- web/src/views/ApplicationManagement/index.tsx | 3 +- web/src/views/EmotionEngine/index.tsx | 18 ++--- .../Index/components/TopCardList/index.tsx | 2 +- .../views/Index/components/VersionCard.tsx | 32 +++++---- .../components/Result.tsx | 4 +- web/src/views/ModelManagement/List.tsx | 5 +- web/src/views/ModelManagement/Square.tsx | 6 +- .../components/CustomModelModal.tsx | 3 +- .../components/ModelListDetail.tsx | 7 +- .../components/MultiKeyConfigModal.tsx | 3 +- web/src/views/ModelManagement/index.tsx | 4 +- web/src/views/ModelManagement/types.ts | 4 +- web/src/views/Ontology/index.tsx | 4 +- web/src/views/Ontology/pages/Detail.tsx | 4 +- web/src/views/SelfReflectionEngine/index.tsx | 18 ++--- .../SpaceManagement/components/SpaceModal.tsx | 31 +++----- web/src/views/UserManagement/index.tsx | 6 +- .../components/AudioPlayer.tsx | 6 +- .../components/PerceptualLastInfo.tsx | 6 +- .../components/Suggestions.tsx | 7 +- .../UserMemoryDetail/pages/ForgetDetail.tsx | 6 +- .../UserMemoryDetail/pages/ImplicitDetail.tsx | 4 +- .../UserMemoryDetail/pages/WorkingDetail.tsx | 72 +++++++++++-------- .../views/UserMemoryDetail/pages/index.tsx | 4 +- .../Workflow/components/CanvasToolbar.tsx | 19 +++-- .../Workflow/components/Chat/chat.module.css | 3 + .../Workflow/components/Editor/index.tsx | 6 +- .../components/Nodes/ConditionNode.tsx | 2 +- .../Properties/ModelConfig/index.tsx | 2 +- .../Properties/ToolConfig/index.tsx | 5 +- web/src/views/Workflow/index.tsx | 1 + 42 files changed, 223 insertions(+), 191 deletions(-) diff --git a/web/src/components/ModelSelect/index.tsx b/web/src/components/ModelSelect/index.tsx index a71e9703..3a6e42b6 100644 --- a/web/src/components/ModelSelect/index.tsx +++ b/web/src/components/ModelSelect/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-03-07 16:49:59 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-18 10:12:23 + * @Last Modified time: 2026-03-25 11:21:59 */ import { useEffect, useState, type FC } from 'react'; import { Select, Flex, Space } from 'antd'; @@ -20,12 +20,16 @@ interface ModelSelectProps extends SelectProps { params?: Query; placeholder?: string; fontClassName?: string; + isAutoFetch?: boolean; + initialData?: Model[]; } const ModelSelect: FC = ({ params, placeholder, fontClassName, + isAutoFetch = true, + initialData = [], ...props }) => { const { t } = useTranslation(); @@ -33,6 +37,7 @@ const ModelSelect: FC = ({ // Fetch active models whenever params change; stringify for stable deep comparison useEffect(() => { + if (!isAutoFetch) return getModelList({ ...(params ?? {}), pagesize: 100, @@ -40,7 +45,7 @@ const ModelSelect: FC = ({ }).then((res) => { setOptions((res as { items: Model[] }).items ?? []); }); - }, [JSON.stringify(params)]); + }, [JSON.stringify(params), isAutoFetch]); // Render the selected value inside the trigger with logo + truncated name const labelRender: SelectProps['labelRender'] = ({ value }) => { @@ -58,7 +63,7 @@ const ModelSelect: FC = ({ return ( } diff --git a/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx b/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx index 32ba9dae..009d578a 100644 --- a/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx +++ b/web/src/views/ApplicationConfig/components/Skill/SkillListModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-05 10:45:08 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 16:59:57 + * @Last Modified time: 2026-03-25 11:09:01 */ import { forwardRef, useEffect, useImperativeHandle, useState } from 'react'; import { List, Flex, Tooltip, Form } from 'antd'; @@ -169,6 +169,7 @@ const SkillListModal = forwardRef(({ @@ -181,9 +182,9 @@ const SkillListModal = forwardRef(({ renderItem={(item: Skill) => ( {/* Skill card with selection state styling */} -
handleSelect(item)}> {/* Skill name and description */}
@@ -194,7 +195,7 @@ const SkillListModal = forwardRef(({ {/* Skill description with tooltip */} - +
{item.description}
diff --git a/web/src/views/ApplicationManagement/MySharing.tsx b/web/src/views/ApplicationManagement/MySharing.tsx index f6971349..291ec4b3 100644 --- a/web/src/views/ApplicationManagement/MySharing.tsx +++ b/web/src/views/ApplicationManagement/MySharing.tsx @@ -2,11 +2,11 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:34:12 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-18 16:15:43 + * @Last Modified time: 2026-03-25 11:37:51 */ import React, { useState, useEffect, useMemo, type MouseEvent } from 'react'; import { useTranslation } from 'react-i18next'; -import { Button, App, Flex, Row, Col, Collapse } from 'antd'; +import { Button, App, Flex, Collapse } from 'antd'; import clsx from 'clsx'; import type { MySharedOutItem } from './types'; @@ -112,9 +112,9 @@ const MySharing: React.FC = () => { ), children: ( - +
{items.map(item => ( - handleEdit(item)}> +
handleEdit(item)}>
handleCancelOne(item, e)} @@ -153,15 +153,15 @@ const MySharing: React.FC = () => { {item.source_app_is_active ? t('application.sourceActive') : t('application.sourceInactive')} - +
))} - +
), }]} /> ))} - + ); }; diff --git a/web/src/views/ApplicationManagement/index.tsx b/web/src/views/ApplicationManagement/index.tsx index 2d04a2e9..faf7e55d 100644 --- a/web/src/views/ApplicationManagement/index.tsx +++ b/web/src/views/ApplicationManagement/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:34:12 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-19 21:29:45 + * @Last Modified time: 2026-03-25 11:16:04 */ /** * Application Management Page @@ -148,6 +148,7 @@ const ApplicationManagement: React.FC = () => { label: t(`application.${type}`), }))} allowClear + variant="filled" className="rb:w-30!" /> diff --git a/web/src/views/EmotionEngine/index.tsx b/web/src/views/EmotionEngine/index.tsx index 3a9cadc0..4acdd9d7 100644 --- a/web/src/views/EmotionEngine/index.tsx +++ b/web/src/views/EmotionEngine/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:56:54 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-12 16:58:14 + * @Last Modified time: 2026-03-25 11:42:26 */ /** * Emotion Engine Configuration Page @@ -19,13 +19,12 @@ import clsx from 'clsx'; import RbCard from '@/components/RbCard/Card'; import { getMemoryEmotionConfig, updateMemoryEmotionConfig } from '@/api/memory' import type { ConfigForm } from './types' -import CustomSelect from '@/components/CustomSelect'; -import { getModelListUrl } from '@/api/models' import SwitchFormItem from '@/components/FormItem/SwitchFormItem' import LabelWrapper from '@/components/FormItem/LabelWrapper' import DescWrapper from '@/components/FormItem/DescWrapper' import RbSlider from '@/components/RbSlider'; import RbAlert from '@/components/RbAlert'; +import ModelSelect from '@/components/ModelSelect'; /** * Configuration field definitions @@ -37,9 +36,8 @@ const configList = [ }, { key: 'emotion_model_id', - type: 'customSelect', - url: getModelListUrl, - params: { type: 'chat,llm', page: 1, pagesize: 100, is_active: true }, // chat,llm + type: 'modelSelect', + params: { type: 'chat,llm' }, // chat,llm }, { key: 'emotion_min_intensity', @@ -174,7 +172,7 @@ const EmotionEngine: React.FC = () => {
) } - if (config.type === 'customSelect') { + if (config.type === 'modelSelect') { return (
@@ -184,12 +182,8 @@ const EmotionEngine: React.FC = () => { name={config.key} className="rb:mb-0!" > - diff --git a/web/src/views/Index/components/TopCardList/index.tsx b/web/src/views/Index/components/TopCardList/index.tsx index 82cfe21b..c519a00e 100644 --- a/web/src/views/Index/components/TopCardList/index.tsx +++ b/web/src/views/Index/components/TopCardList/index.tsx @@ -68,7 +68,7 @@ const TopCardList: FC<{data?: DataResponse}> = ({ data }) => {
- {item.key === 'spaces' && String(data?.active_workspaces)} + {item.key === 'spaces' && String(data?.active_workspaces || 0)} {item.key === 'running_apps' && String(data?.[`${item.key}` as keyof DataResponse] || item.value || 0)} {item.key !== 'spaces' && item.key !== 'running_apps' && String(data?.[`total_${item.key}` as keyof DataResponse] || item.value || 0)}
diff --git a/web/src/views/Index/components/VersionCard.tsx b/web/src/views/Index/components/VersionCard.tsx index c0382c7e..dd9e9585 100644 --- a/web/src/views/Index/components/VersionCard.tsx +++ b/web/src/views/Index/components/VersionCard.tsx @@ -6,22 +6,24 @@ * @LastEditors: yujiangping * @LastEditTime: 2026-01-23 19:07:36 */ -import React, { useEffect, useState } from 'react'; +import React, { useEffect, useState, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { Flex } from 'antd'; import { getVersion, type versionResponse } from '@/api/common' +import Empty from '@/components/Empty'; +import { useI18n } from '@/store/locale'; const VersionCard: React.FC = () => { - const { t, i18n } = useTranslation(); + const { t } = useTranslation(); + const { language } = useI18n() const [versionInfo, setVersionInfo] = useState(null); // 获取当前语言对应的介绍信息 - const getIntroduction = () => { + const introduction = useMemo(() => { if (!versionInfo) return null; - const currentLang = i18n.language; - return currentLang === 'zh' ? versionInfo.introduction : (versionInfo.introduction_en || versionInfo.introduction); - }; + return language === 'zh' ? versionInfo.introduction : (versionInfo.introduction_en || versionInfo.introduction); + }, [versionInfo, language]) useEffect(() => { const fetchVersion = async () => { @@ -40,13 +42,14 @@ const VersionCard: React.FC = () => {
{t('index.latestUpdate')} - - {versionInfo?.version} - + {versionInfo?.version && + + {versionInfo?.version} + + } - {versionInfo && (() => { - const introduction = getIntroduction(); - return introduction ? (<> + {introduction + ? (<>
{t('version.releaseDate')}: {introduction.releaseDate} | {t('version.name')}: {introduction.codeName}
@@ -63,8 +66,9 @@ const VersionCard: React.FC = () => { /> ))}
- ) : null; - })()} + ) + : + }
); }; diff --git a/web/src/views/MemoryExtractionEngine/components/Result.tsx b/web/src/views/MemoryExtractionEngine/components/Result.tsx index 063d6d6f..46d05dcd 100644 --- a/web/src/views/MemoryExtractionEngine/components/Result.tsx +++ b/web/src/views/MemoryExtractionEngine/components/Result.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:30:11 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-19 15:38:38 + * @Last Modified time: 2026-03-25 11:40:38 */ /** * Result Component @@ -382,7 +382,7 @@ const Result: FC = ({ loading, handleSave }) => { ))}
} - if (textPreprocessingTab === 'chunking') { + if (textPreprocessingTab === 'chunking' && vo.content) { return (
-{t('memoryExtractionEngine.fragment')}{vo.chunk_index}:
diff --git a/web/src/views/ModelManagement/List.tsx b/web/src/views/ModelManagement/List.tsx index aac86059..bff02e80 100644 --- a/web/src/views/ModelManagement/List.tsx +++ b/web/src/views/ModelManagement/List.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:50:10 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 16:52:48 + * @Last Modified time: 2026-03-25 12:27:51 */ /** * Model List View @@ -26,7 +26,7 @@ import { getListLogoUrl } from './utils' /** * Model list component */ -const ModelList = forwardRef void; }> (({ query, handleEdit }, ref) => { +const ModelList = forwardRef void; handleCloseModel: () => void; }>(({ query, handleEdit, handleCloseModel }, ref) => { const { t } = useTranslation(); const keyConfigModalRef = useRef(null) const modelListDetailRef = useRef(null) @@ -101,6 +101,7 @@ const ModelList = forwardRef ) diff --git a/web/src/views/ModelManagement/Square.tsx b/web/src/views/ModelManagement/Square.tsx index 6f663a99..be59101c 100644 --- a/web/src/views/ModelManagement/Square.tsx +++ b/web/src/views/ModelManagement/Square.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:50:14 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-23 11:33:44 + * @Last Modified time: 2026-03-25 12:19:24 */ /** * Model Square View @@ -39,7 +39,9 @@ const ModelSquare = forwardRef (({ query }, ref) => { .then(res => { const response = res as ModelPlaza[] setList(response || []) - setActiveProvider(response[0]?.provider || null) + if (!activeProvider) { + setActiveProvider(response[0]?.provider || null) + } }) } diff --git a/web/src/views/ModelManagement/components/CustomModelModal.tsx b/web/src/views/ModelManagement/components/CustomModelModal.tsx index 11423c4a..d6784c60 100644 --- a/web/src/views/ModelManagement/components/CustomModelModal.tsx +++ b/web/src/views/ModelManagement/components/CustomModelModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:49:28 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 18:23:31 + * @Last Modified time: 2026-03-25 12:27:33 */ /** * Custom Model Modal @@ -148,6 +148,7 @@ const CustomModelModal = forwardRef( /** Expose methods to parent component */ useImperativeHandle(ref, () => ({ handleOpen, + handleClose })); return ( void; handleEdit: (vo?: ModelListItem) => void; + handleCloseConfig?: () => void; } /** * Model list detail drawer component */ -const ModelListDetail = forwardRef(({ refresh, handleEdit }, ref) => { +const ModelListDetail = forwardRef(({ refresh, handleEdit, handleCloseConfig }, ref) => { const { t } = useTranslation(); const [open, setOpen] = useState(false); const [data, setData] = useState({} as ProviderModelItem) @@ -84,6 +85,8 @@ const ModelListDetail = forwardRef(({ setType(null) setOpen(false) refresh?.() + multiKeyConfigModalRef.current?.handleClose() + handleCloseConfig?.() } /** Refresh model list */ const handleRefresh = () => { diff --git a/web/src/views/ModelManagement/components/MultiKeyConfigModal.tsx b/web/src/views/ModelManagement/components/MultiKeyConfigModal.tsx index 50e7dc62..11d22b35 100644 --- a/web/src/views/ModelManagement/components/MultiKeyConfigModal.tsx +++ b/web/src/views/ModelManagement/components/MultiKeyConfigModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:49:55 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-11 15:11:06 + * @Last Modified time: 2026-03-25 12:24:41 */ /** * Multi-Key Configuration Modal @@ -95,6 +95,7 @@ const MultiKeyConfigModal = forwardRef ({ handleOpen, + handleClose })); return ( diff --git a/web/src/views/ModelManagement/index.tsx b/web/src/views/ModelManagement/index.tsx index 15ed1424..b5fa6669 100644 --- a/web/src/views/ModelManagement/index.tsx +++ b/web/src/views/ModelManagement/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:50:05 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-20 19:02:31 + * @Last Modified time: 2026-03-25 12:28:07 */ /** * Model Management Main Page @@ -134,7 +134,7 @@ const tabKeys = ['group', 'list', 'square']
{activeTab === 'group' && } - {activeTab === 'list' && } + {activeTab === 'list' && customModelModalRef.current?.handleClose() } />} {activeTab === 'square' && }
void; + handleClose: () => void; } /** @@ -303,6 +304,7 @@ export interface CustomModelForm { export interface CustomModelModalRef { /** Open modal with optional model plaza item */ handleOpen: (vo?: ModelListItem) => void; + handleClose: () => void; } /** diff --git a/web/src/views/Ontology/index.tsx b/web/src/views/Ontology/index.tsx index 834dca80..cd599b97 100644 --- a/web/src/views/Ontology/index.tsx +++ b/web/src/views/Ontology/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 14:10:15 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-20 16:36:02 + * @Last Modified time: 2026-03-25 13:38:59 */ import { type FC, useState, useRef } from 'react'; import type { MenuInfo } from 'rc-menu/lib/interface'; @@ -164,7 +164,7 @@ const Ontology: FC = () => { }} placement="bottomRight" > -
+
e.stopPropagation()} className="rb:cursor-pointer rb:size-6 rb:bg-[url('@/assets/images/common/more.svg')] rb:hover:bg-[url('@/assets/images/common/more_hover.svg')]">
} diff --git a/web/src/views/Ontology/pages/Detail.tsx b/web/src/views/Ontology/pages/Detail.tsx index ac886277..fdf33105 100644 --- a/web/src/views/Ontology/pages/Detail.tsx +++ b/web/src/views/Ontology/pages/Detail.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 14:10:20 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-20 16:35:14 + * @Last Modified time: 2026-03-25 12:16:23 */ import { type FC, useEffect, useState, useRef } from 'react' import { useParams, useNavigate } from 'react-router-dom'; @@ -122,7 +122,7 @@ const Detail: FC = () => { } /> -
+
{ > {configList.map(config => { - if (config.type === 'customSelect') { + if (config.type === 'modelSelect') { return (
@@ -205,12 +203,8 @@ const SelfReflectionEngine: React.FC = () => { name={config.key} className="rb:mb-0!" > - diff --git a/web/src/views/SpaceManagement/components/SpaceModal.tsx b/web/src/views/SpaceManagement/components/SpaceModal.tsx index 5a639244..f5f6841f 100644 --- a/web/src/views/SpaceManagement/components/SpaceModal.tsx +++ b/web/src/views/SpaceManagement/components/SpaceModal.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 17:49:09 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 17:49:09 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-25 11:45:54 */ /** * Space Modal Component @@ -17,13 +17,12 @@ import type { SpaceModalData, SpaceModalRef, Space, StorageType } from '../types import RbModal from '@/components/RbModal' import { createWorkspace } from '@/api/workspaces' import RadioGroupCard from '@/components/RadioGroupCard' -import { getModelListUrl } from '@/api/models' -import CustomSelect from '@/components/CustomSelect' import UploadImages from '@/components/Upload/UploadImages' import { getFileLink } from '@/api/fileStorage' import ragIcon from '@/assets/images/space/rag.png' import neo4jIcon from '@/assets/images/space/neo4j.png' import { stringRegExp } from '@/utils/validator'; +import ModelSelect from '@/components/ModelSelect'; const FormItem = Form.Item; @@ -206,12 +205,8 @@ const SpaceModal = forwardRef(({ name="llm" rules={[{ required: true, message: t('common.selectPlaceholder', { title: t('space.llmModel') }) }]} > - @@ -221,12 +216,8 @@ const SpaceModal = forwardRef(({ name="embedding" rules={[{ required: true, message: t('common.selectPlaceholder', { title: t('space.embeddingModel') }) }]} > - @@ -236,12 +227,8 @@ const SpaceModal = forwardRef(({ name="rerank" rules={[{ required: true, message: t('common.selectPlaceholder', { title: t('space.rerankModel') }) }]} > - diff --git a/web/src/views/UserManagement/index.tsx b/web/src/views/UserManagement/index.tsx index 3c3bfd05..548cb322 100644 --- a/web/src/views/UserManagement/index.tsx +++ b/web/src/views/UserManagement/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:51:08 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-23 12:14:51 + * @Last Modified time: 2026-03-25 10:41:25 */ /** * User Management Page @@ -72,7 +72,7 @@ const UserManagement: React.FC = () => { className: 'rb:text-[#212332]' }, { - title: <>{t('user.username')}
({t(`user.subUsername`)})
, + title: <>{t('user.username')}
({t(`user.subUsername`)})
, dataIndex: 'email', key: 'email', width: 210, @@ -121,7 +121,7 @@ const UserManagement: React.FC = () => { key: 'action', width: 137, render: (_, record) => ( - + {record.is_active &&
))}
{loading ? @@ -147,7 +147,7 @@ const PerceptualLastInfo: FC = () => {
-
{data.file_name}
+
{data.file_name}
{fileSize || '-'}
diff --git a/web/src/views/UserMemoryDetail/components/Suggestions.tsx b/web/src/views/UserMemoryDetail/components/Suggestions.tsx index 66d20c28..6bce10aa 100644 --- a/web/src/views/UserMemoryDetail/components/Suggestions.tsx +++ b/web/src/views/UserMemoryDetail/components/Suggestions.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 18:31:50 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:02:00 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-25 11:50:16 */ import { useEffect, useState, useRef, forwardRef, useImperativeHandle } from 'react' import { useTranslation } from 'react-i18next' @@ -83,7 +83,8 @@ const Suggestions = forwardRef<{ handleRefresh: () => void; }, { refresh: () => title={t('statementDetail.suggestions')} headerType="borderless" headerClassName="rb:min-h-[46px]! rb:font-[MiSans-Bold] rb:font-bold" - bodyClassName="rb:p-3! rb:pt-0! rb:h-[740px]" + bodyClassName="rb:p-3! rb:pt-0! rb:h-[calc(100%-46px)]! rb:overflow-y-auto!" + className="rb:h-[calc(100vh-88px)]!" > {suggestions?.suggestions && suggestions?.suggestions.length > 0 ? diff --git a/web/src/views/UserMemoryDetail/pages/ForgetDetail.tsx b/web/src/views/UserMemoryDetail/pages/ForgetDetail.tsx index 10791743..2510aaa9 100644 --- a/web/src/views/UserMemoryDetail/pages/ForgetDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/ForgetDetail.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-01-07 20:37:34 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:07:50 + * @Last Modified time: 2026-03-25 12:05:26 */ import { useEffect, useState, useMemo, forwardRef, useImperativeHandle, useRef } from 'react' import { useTranslation } from 'react-i18next' @@ -170,8 +170,8 @@ const ForgetDetail = forwardRef((_props, ref) => {
{data.activation_metrics?.low_activation_nodes ?? 0}
{t('forgetDetail.low_nodes')}
-
-
+
+
diff --git a/web/src/views/UserMemoryDetail/pages/ImplicitDetail.tsx b/web/src/views/UserMemoryDetail/pages/ImplicitDetail.tsx index 8445979c..2448ff90 100644 --- a/web/src/views/UserMemoryDetail/pages/ImplicitDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/ImplicitDetail.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-01-08 19:46:02 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 14:27:58 + * @Last Modified time: 2026-03-25 11:56:55 */ import { forwardRef, useImperativeHandle, useRef, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -91,7 +91,7 @@ const ImplicitDetail = forwardRef<{ handleRefresh: () => void; }, { refresh: () headerType="borderless" headerClassName="rb:min-h-[50px]! rb:font-[MiSans-Bold] rb:font-bold" bodyClassName="rb:p-3! rb:pt-0! rb:h-[calc(100%-54px)]" - className="rb:h-[calc(100vh-84px)]!" + className="rb:h-[calc(100vh-88px)]!" > { :( -
- - {data.map(item => ( - setSelected(item)} - > -
- -
- {item.title} -
-
+ +
+ + + {data.map(item => ( + setSelected(item)} + > +
+ +
+ {item.title} +
+
+
+ ))}
- ))} -
-
+
+
+ {selected && <> @@ -193,7 +203,7 @@ const WorkingDetail: FC = () => { headerType="borderless" headerClassName="rb:min-h-[42px]! rb:pt-4! rb:font-[MiSans-Bold] rb:font-bold" bodyClassName='rb:p-4! rb:pt-0! rb:h-[calc(100%-42px)]' - className="rb:h-full!" + className="rb:h-[calc(100vh-88px)]!" >
{timeRange}
@@ -222,7 +232,7 @@ const WorkingDetail: FC = () => { headerType="borderless" headerClassName="rb:min-h-[50px]! rb:font-[MiSans-Bold] rb:font-bold rb:leading-5.5" bodyClassName='rb:p-4! rb:pt-0! rb:h-[calc(100%-50px)] rb:overflow-y-auto!' - className="rb:h-full!" + className="rb:h-[calc(100vh-88px)]!" > {detailLoading ? diff --git a/web/src/views/UserMemoryDetail/pages/index.tsx b/web/src/views/UserMemoryDetail/pages/index.tsx index f8e4323c..f8ce00c3 100644 --- a/web/src/views/UserMemoryDetail/pages/index.tsx +++ b/web/src/views/UserMemoryDetail/pages/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-01-07 20:37:34 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-20 11:52:00 + * @Last Modified time: 2026-03-25 11:47:31 */ import { type FC, useState, useMemo, useRef } from 'react' import { useParams, useNavigate } from 'react-router-dom' @@ -114,7 +114,7 @@ const Detail: FC = () => { } /> -
+
{type === 'EMOTIONAL_MEMORY' && } {type === 'FORGET_MEMORY' && } {type === 'IMPLICIT_MEMORY' && } diff --git a/web/src/views/Workflow/components/CanvasToolbar.tsx b/web/src/views/Workflow/components/CanvasToolbar.tsx index c6654511..6a2cbc7f 100644 --- a/web/src/views/Workflow/components/CanvasToolbar.tsx +++ b/web/src/views/Workflow/components/CanvasToolbar.tsx @@ -1,10 +1,14 @@ import type { FC } from 'react'; import { Select, Divider } from 'antd'; -// import { Node } from '@antv/x6'; -import type { GraphRef } from '../types' import { PlusOutlined, MinusOutlined, FileAddOutlined } from '@ant-design/icons' +import clsx from 'clsx' +import { Node } from '@antv/x6'; + +import type { GraphRef } from '../types' interface CanvasToolbarProps { + /** Currently selected node */ + selectedNode: Node | null; miniMapRef: React.RefObject; graphRef: GraphRef; isHandMode: boolean; @@ -14,6 +18,7 @@ interface CanvasToolbarProps { } const CanvasToolbar: FC = ({ + selectedNode, miniMapRef, graphRef, zoomLevel, @@ -26,9 +31,15 @@ const CanvasToolbar: FC = ({ return ( <> {/* 小地图 */} -
+
{/* 缩放控制按钮 */} -
+
graphRef.current?.zoom(-0.1)} />