diff --git a/web/src/components/Chat/ChatContent.tsx b/web/src/components/Chat/ChatContent.tsx index 34472a2e..ddb25838 100644 --- a/web/src/components/Chat/ChatContent.tsx +++ b/web/src/components/Chat/ChatContent.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2025-12-10 16:46:17 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-26 13:32:29 + * @Last Modified time: 2026-03-27 14:17:38 */ import { type FC, useRef, useEffect, useState } from 'react' import clsx from 'clsx' @@ -194,7 +194,10 @@ const ChatContent: FC = ({ key={idx} size="small" className="rb:text-[12px]!" - onClick={() => window.open(`/knowledge/${citation.knowledge_id}/document/${citation.document_id}`, '_blank')} + onClick={() => { + const params = new URLSearchParams({ documentId: citation.document_id, parentId: citation.knowledge_id }); + window.open(`/#/knowledge-base/${citation.knowledge_id}/DocumentDetails?${params}`, '_blank'); + }} >{citation.file_name} ))} } diff --git a/web/src/components/Empty/BodyWrapper.tsx b/web/src/components/Empty/BodyWrapper.tsx index 22bd226a..067b743c 100644 --- a/web/src/components/Empty/BodyWrapper.tsx +++ b/web/src/components/Empty/BodyWrapper.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:02:47 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-02 15:47:24 + * @Last Modified time: 2026-03-26 14:58:24 */ /** * BodyWrapper Component diff --git a/web/src/components/Header/index.module.css b/web/src/components/Header/index.module.css index 2d300abf..ca7c79cf 100644 --- a/web/src/components/Header/index.module.css +++ b/web/src/components/Header/index.module.css @@ -3,7 +3,6 @@ align-items: center; justify-content: space-between; padding: 16px 24px 16px 20px; - height: 64px; color: #212332; z-index: 0; font-size: 14px; diff --git a/web/src/components/Layout/AuthLayout.tsx b/web/src/components/Layout/AuthLayout.tsx index a7516367..d71bf147 100644 --- a/web/src/components/Layout/AuthLayout.tsx +++ b/web/src/components/Layout/AuthLayout.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:11:02 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 18:43:42 + * @Last Modified time: 2026-03-26 15:01:02 */ /** * AuthLayout Component @@ -54,14 +54,14 @@ const AuthLayout: FC = () => { }, []); return ( - + {/* Sidebar navigation */} - + {/* Header with breadcrumbs and user menu */} {/* Main content area - renders child routes */} - + diff --git a/web/src/components/Layout/AuthSpaceLayout.tsx b/web/src/components/Layout/AuthSpaceLayout.tsx index 1efa6fd4..129f67bc 100644 --- a/web/src/components/Layout/AuthSpaceLayout.tsx +++ b/web/src/components/Layout/AuthSpaceLayout.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:11:43 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-05 14:57:08 + * @Last Modified time: 2026-03-26 15:00:54 */ /** * AuthSpaceLayout Component @@ -56,14 +56,14 @@ const AuthSpaceLayout: FC = () => { }, []); return ( - + {/* Sidebar navigation configured for space mode */} - + {/* Header with breadcrumbs and user menu configured for space mode */} {/* Main content area for knowledge base pages - renders child routes */} - + diff --git a/web/src/components/Layout/BasicAuthLayout.tsx b/web/src/components/Layout/BasicAuthLayout.tsx index f279a48b..2f40ac37 100644 --- a/web/src/components/Layout/BasicAuthLayout.tsx +++ b/web/src/components/Layout/BasicAuthLayout.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:12:42 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-28 17:28:41 + * @Last Modified time: 2026-03-26 15:36:25 */ /** * BasicAuthLayout Component @@ -35,7 +35,7 @@ const BasicAuthLayout: FC = () => { }, [getUserInfo]); return ( -
+
{/* Render child routes without additional UI */}
diff --git a/web/src/components/Layout/PageHeader.tsx b/web/src/components/Layout/PageHeader.tsx index ddc420fd..88117da0 100644 --- a/web/src/components/Layout/PageHeader.tsx +++ b/web/src/components/Layout/PageHeader.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-10 11:08:27 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 11:19:48 + * @Last Modified time: 2026-03-26 15:38:31 */ /* * PageHeader Component @@ -43,7 +43,7 @@ const PageHeader: FC = ({ }) => { return ( // Main header container: full width, 64px height, flex layout with space between -
+
{avatarUrl ? {avatarUrl} @@ -58,7 +58,7 @@ const PageHeader: FC = ({ {operation} - {centerContent && + {centerContent && {centerContent} } {/* Right section: Extra content (buttons, filters, etc.) */} diff --git a/web/src/components/PageScrollList/index.tsx b/web/src/components/PageScrollList/index.tsx index 19e29297..f78bb29b 100644 --- a/web/src/components/PageScrollList/index.tsx +++ b/web/src/components/PageScrollList/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:18:19 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-19 20:47:34 + * @Last Modified time: 2026-03-26 14:43:33 */ /** * PageScrollList Component @@ -56,9 +56,10 @@ interface PageScrollListProps> { /** Additional CSS classes */ className?: string; needLoading?: boolean; + heightClass?: string; } -const heightClass = 'rb:h-[calc(100vh-124px)]!'; +const defaultHeightClass = 'rb:h-[calc(100vh-116px)]!'; /** Infinite scroll list component with pagination support */ const PageScrollList = forwardRef(>({ @@ -68,6 +69,7 @@ const PageScrollList = forwardRef(>({ column = 4, className = '', needLoading = true, + heightClass, }: PageScrollListProps, ref: React.Ref) => { /** Expose refresh method to parent component */ useImperativeHandle(ref, () => ({ @@ -140,13 +142,13 @@ const PageScrollList = forwardRef(>({
loadMoreData()} hasMore={hasMore} - loader={loading && needLoading ? : false} + loader={loading && needLoading ? : false} // endMessage={It is all, nothing more 🤐} scrollableTarget="scrollableDiv" className='rb:h-full!' @@ -162,7 +164,7 @@ const PageScrollList = forwardRef(>({ ))} - ) : !loading ? : null} + ) : !loading ? : null}
diff --git a/web/src/components/Table/index.tsx b/web/src/components/Table/index.tsx index d33f8171..62c9421a 100644 --- a/web/src/components/Table/index.tsx +++ b/web/src/components/Table/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-02 15:29:46 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 17:11:55 + * @Last Modified time: 2026-03-26 14:52:23 */ /** * RbTable Component @@ -199,7 +199,7 @@ const RbTable = forwardRef(, Q = Record 0 ? config : undefined; diff --git a/web/src/styles/antdThemeConfig.ts b/web/src/styles/antdThemeConfig.ts index 0d9786b4..8b610ea0 100644 --- a/web/src/styles/antdThemeConfig.ts +++ b/web/src/styles/antdThemeConfig.ts @@ -32,7 +32,7 @@ export const lightTheme: ThemeConfig = { bodyBg: '#EEEFF4', siderBg: '#FAFCFF', headerPadding: '0 24px 0 20px', - headerHeight: 64, + headerHeight: 56, headerColor: '#212332', }, Menu: { diff --git a/web/src/views/ApplicationConfig/Agent.tsx b/web/src/views/ApplicationConfig/Agent.tsx index 0d272c1d..9aaac375 100644 --- a/web/src/views/ApplicationConfig/Agent.tsx +++ b/web/src/views/ApplicationConfig/Agent.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:29:21 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-26 12:13:33 + * @Last Modified time: 2026-03-27 13:46:18 */ import { useEffect, useRef, useState, forwardRef, useImperativeHandle, useMemo } from 'react'; import { useTranslation } from 'react-i18next' @@ -44,6 +44,14 @@ import SwitchFormItem from '@/components/FormItem/SwitchFormItem' import DescWrapper from '@/components/FormItem/DescWrapper' import FeaturesConfig from './components/FeaturesConfig' import { getListLogoUrl } from '@/views/ModelManagement/utils'; +import type { ChatItem } from '@/components/Chat/types' + +export const replaceVariables = (statement: string, variables: Variable[]) => { + return statement.replace(/\{\{([^}]+)\}\}/g, (match, name) => { + const v = variables.find(item => item.name === name) + return v?.value != null && v.value !== '' ? String(v.value) : match + }) +} /** * Agent configuration component @@ -148,8 +156,9 @@ const Agent = forwardRef { chatVariableConfigModalRef.current?.handleOpen(chatVariables) } + /** * Save chat variable configuration * @param values - Variable values */ const handleSaveChatVariable = (variables: Variable[]) => { setChatVariables(variables) - const opening_statement = form.getFieldValue(['features', 'opening_statement']) - - if (opening_statement?.statement && opening_statement?.statement.trim() !== '') { - const statement = opening_statement.statement as string - const replacedContent = statement.replace(/\{\{([^}]+)\}\}/g, (match, name) => { - const v = variables.find(item => item.name === name) - return v?.value != null && v.value !== '' ? String(v.value) : match - }) - setChatList(prev => prev.map(item => { - const list = [...(item.list || [])] - if (list.length > 0 && list[0].role === 'assistant') { - list[0] = { ...list[0], content: replacedContent } - } - return { ...item, list } - })) - } } useEffect(() => { setChatVariables(values?.variables || []) @@ -360,43 +354,55 @@ const Agent = forwardRef { form.setFieldValue('features', value) - - if (value?.opening_statement?.statement && value?.opening_statement?.statement.trim() !== '') { - setChatList(prev => (prev.map(item => { - const firstMsg = item.list?.[0] - - if (firstMsg?.role === 'assistant') { - firstMsg.meta_data = { - suggested_questions: value.opening_statement?.suggested_questions || [] - } - return item - } else { - return { - ...item, - list: [{ - role: 'assistant', - content: value.opening_statement?.statement, - meta_data: { - suggested_questions: value.opening_statement?.suggested_questions || [] - } - }, ...(item.list || [])] - } - } - }))) - } } const modelLogo = useMemo(() => { return defaultModel?.name && getListLogoUrl(defaultModel.provider, defaultModel.logo as string) }, [defaultModel]) + + useEffect(() => { + const opening_statement = form.getFieldValue(['features', 'opening_statement']) + console.log('opening_statement', opening_statement, defaultModel, chatList) + + if (opening_statement?.enabled && opening_statement?.statement && opening_statement?.statement.trim() !== '') { + const assistantMsg: ChatItem = { + role: 'assistant', + content: replaceVariables(opening_statement.statement, chatVariables), + meta_data: { + suggested_questions: opening_statement?.suggested_questions + } + } + setChatList(prev => { + if (prev.length === 0 && !defaultModel) return prev + if (defaultModel && prev.length === 1) { + return [{ + label: defaultModel.name, + model_config_id: defaultModel.id, + model_parameters: defaultModel.config as unknown as ModelConfig, + list: [assistantMsg] + }] + } + + return prev.map(vo => { + if (vo.list?.length === 0) { + return { ...vo, list: [assistantMsg] } + } else if (vo.list && vo.list[0].role === 'assistant') { + return { ...vo, list: [assistantMsg, ...vo.list.slice(1)] } + } else { + return { ...vo, list: [assistantMsg, ...(vo.list || [])] } + } + }) + }) + } + }, [defaultModel, chatList.length, form.getFieldValue(['features', 'opening_statement']), chatVariables]) console.log('agent values', values) return ( <> {loading && } - - + +
- + - - - - ({ - value: type, - label: t(`application.${type}`), - labelDesc: t(`application.${type}Desc`), - }))} - allowClear={false} - block={true} - /> - - + + + + + ({ + value: type, + label: t(`application.${type}`), + labelDesc: t(`application.${type}Desc`), + }))} + allowClear={false} + block={true} + /> + + @@ -289,45 +290,46 @@ const Cluster = forwardRef{t('application.modelConfig')} - - {t('application.orchestrationMode')}} - className="rb:mb-4!" - > - ({ - value: type, - label: t(`application.${type}`), - }))} - placeholder={t('common.pleaseSelect')} - /> - - } + + {t('application.orchestrationMode')}} + className="rb:mb-4!" + > + ({ + value: type, + label: t(`application.${type}`), + }))} + placeholder={t('common.pleaseSelect')} + /> + + } +
- + = { history: 'default', } -const heightClass = 'rb:h-[calc(100vh-88px)]' +const heightClass = 'rb:max-h-[calc(100vh-140px)]' /** * Release page component * Manages application version releases, rollbacks, and version history @@ -77,51 +77,55 @@ const ReleasePage: FC<{data: Application; refresh: () => void}> = ({data, refres } return ( -
+
{t('application.versionList')}
{t('application.versionListDesc')}
- {releaseList.length === 0 - ? - : selectedVersion && releaseList.map((version, index) => { - const tagKey = version.id === data.current_release_id && index === 0 - ? 'current' - : version.id === data.current_release_id - ? 'rolledBack' : 'history' - return ( - - {version.version_name && version.version_name[0].toLocaleLowerCase() === 'v' ? version.version_name : version.version_name ? `v${version.version_name}` : `v${version.version}`} - {tagKey && - {tagKey} - } - } - className={clsx("rb:hover:shadow-[0px_2px_8px_0px_rgba(0,0,0,0.2)]! rb:cursor-pointer rb:bg-white", { - 'rb:border-[#171719]!': version.id === selectedVersion.id, - 'rb:border-[#DFE4ED] ': version.id !== selectedVersion.id - })} - headerType="borderless" - onClick={() => setSelectedVersion(version)} - > -
- -
-
- {t('application.publishedOn')} {formatDateTime(version.published_at, 'YYYY-MM-DD HH:mm:ss')} -
-
- {t('application.publisher')}: {version.publisher_name} -
-
- ) - }) - } +
+ {releaseList.length === 0 + ? + : + {selectedVersion && releaseList.map((version, index) => { + const tagKey = version.id === data.current_release_id && index === 0 + ? 'current' + : version.id === data.current_release_id + ? 'rolledBack' : 'history' + return ( + + {version.version_name && version.version_name[0].toLocaleLowerCase() === 'v' ? version.version_name : version.version_name ? `v${version.version_name}` : `v${version.version}`} + {tagKey && + {tagKey} + } + } + className={clsx("rb:hover:shadow-[0px_2px_8px_0px_rgba(0,0,0,0.2)]! rb:cursor-pointer rb:bg-white", { + 'rb:border-[#171719]!': version.id === selectedVersion.id, + 'rb:border-[#DFE4ED] ': version.id !== selectedVersion.id + })} + headerType="borderless" + onClick={() => setSelectedVersion(version)} + > +
+ +
+
+ {t('application.publishedOn')} {formatDateTime(version.published_at, 'YYYY-MM-DD HH:mm:ss')} +
+
+ {t('application.publisher')}: {version.publisher_name} +
+
+ ) + })} +
+ } +
-
+
void}> = ({data, refres {selectedVersion && - + = ({ } return ( -
+
{ - let options = [{ type: 'document', enabled: fu.document_enabled, maxSize: fu.document_max_size_mb }] + let options = fu.document_enabled ? [{ type: 'document', enabled: fu.document_enabled, maxSize: fu.document_max_size_mb }] : [] if (!capability) return options - if (capability.includes('vision')) { + if ((capability.includes('vision') || source === 'workflow') && fu.image_enabled) { options.push({ type: 'image', enabled: fu.image_enabled, maxSize: fu.image_max_size_mb }) } - if (capability.includes('audio')) { + if ((capability.includes('audio') || source === 'workflow') && fu.audio_enabled) { options.push({ type: 'audio', enabled: fu.audio_enabled, maxSize: fu.audio_max_size_mb }) } - if (capability.includes('video')) { + if ((capability.includes('video') || source === 'workflow') && fu.video_enabled) { options.push({ type: 'video', enabled: fu.video_enabled, maxSize: fu.video_max_size_mb }) } return options.filter(item => item.enabled) @@ -201,6 +201,7 @@ const FeaturesConfigModal = forwardRef @@ -23,6 +24,7 @@ interface FileUploadSettingModalRef { interface FileUploadSettingModalProps { onSave: (values: FileUpload) => void; capability?: Capability[]; + source?: Application['type'] } const documentType = { type: 'document', @@ -108,6 +110,7 @@ const defaultValues: FileUpload = { const FileUploadSettingModal = forwardRef(({ onSave, capability, + source, }, ref) => { const { t } = useTranslation(); const [visible, setVisible] = useState(false); @@ -149,6 +152,14 @@ const FileUploadSettingModal = forwardRef { + if (source === 'workflow') { + return [ + documentType, + imageType, + audioType, + videoType, + ] + } let options = [documentType] if (!capability) return options if (capability.includes('vision')) options = [...options, imageType] diff --git a/web/src/views/ApplicationConfig/components/FeaturesConfig/OpenStatementSettingModal.tsx b/web/src/views/ApplicationConfig/components/FeaturesConfig/OpenStatementSettingModal.tsx index b85a9006..2d829790 100644 --- a/web/src/views/ApplicationConfig/components/FeaturesConfig/OpenStatementSettingModal.tsx +++ b/web/src/views/ApplicationConfig/components/FeaturesConfig/OpenStatementSettingModal.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-03-05 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-26 14:12:11 + * @Last Modified time: 2026-03-27 14:38:28 */ import { forwardRef, useImperativeHandle, useState } from 'react'; import { Button, Form, Input, Flex, App } from 'antd'; @@ -44,12 +44,13 @@ const OpenStatementSettingModal = forwardRef { form.validateFields().then(values => { + const { suggested_questions, ...rest } = values + const filterSuggestedQuestions = suggested_questions.filter(vo => vo && vo.trim() !== '' && vo !== null) if (values?.enabled && values?.statement && values?.statement?.trim() !== '') { const usedVars = [...new Set([...values.statement?.matchAll(/\{\{(\w+)\}\}/g)].map(m => m[1]))] const validNames = new Set(chatVariables.map(v => v.name)) const invalid = usedVars.filter(v => !validNames.has(v)) - console.log('invalid', invalid) if (invalid.length > 0) { modal.confirm({ title: t('application.invalidVariablesTitle'), @@ -57,14 +58,26 @@ const OpenStatementSettingModal = forwardRef { - onSave(values); + onSave({ + ...rest, + suggested_questions: filterSuggestedQuestions + }); handleClose(); }, }) } else { - onSave(values); + onSave({ + ...rest, + suggested_questions: filterSuggestedQuestions + }); handleClose(); } + } else { + onSave({ + ...rest, + suggested_questions: filterSuggestedQuestions + }); + handleClose(); } }); }; diff --git a/web/src/views/ApplicationConfig/components/ModelConfigModal.tsx b/web/src/views/ApplicationConfig/components/ModelConfigModal.tsx index 4ba34160..148afd5a 100644 --- a/web/src/views/ApplicationConfig/components/ModelConfigModal.tsx +++ b/web/src/views/ApplicationConfig/components/ModelConfigModal.tsx @@ -139,6 +139,7 @@ const ModelConfigModal = forwardRef( > {source !== 'multi_agent' && diff --git a/web/src/views/ApplicationConfig/index.tsx b/web/src/views/ApplicationConfig/index.tsx index 1630be49..a9e1df5d 100644 --- a/web/src/views/ApplicationConfig/index.tsx +++ b/web/src/views/ApplicationConfig/index.tsx @@ -2,10 +2,11 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:29:37 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 15:59:47 + * @Last Modified time: 2026-03-26 15:37:18 */ import React, { useEffect, useState, useRef } from 'react'; import { useParams } from 'react-router-dom'; +import { Flex } from 'antd' import ConfigHeader from './components/ConfigHeader' import type { AgentRef, ClusterRef, WorkflowRef, Config } from './types' @@ -108,7 +109,7 @@ const ApplicationConfig: React.FC = () => { } return ( - <> + { features={features} onFeaturesChange={setFeatures} /> -
+
{activeTab === 'arrangement' && application?.type === 'agent' && } {activeTab === 'arrangement' && application?.type === 'multi_agent' && } {activeTab === 'arrangement' && application?.type === 'workflow' && } @@ -129,7 +130,7 @@ const ApplicationConfig: React.FC = () => { {activeTab === 'test' && } {activeTab === 'log' && }
- + ); }; diff --git a/web/src/views/ApplicationManagement/MySharing.tsx b/web/src/views/ApplicationManagement/MySharing.tsx index 291ec4b3..434bf465 100644 --- a/web/src/views/ApplicationManagement/MySharing.tsx +++ b/web/src/views/ApplicationManagement/MySharing.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:34:12 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 11:37:51 + * @Last Modified time: 2026-03-26 14:39:18 */ import React, { useState, useEffect, useMemo, type MouseEvent } from 'react'; import { useTranslation } from 'react-i18next'; @@ -81,7 +81,7 @@ const MySharing: React.FC = () => { } return ( - + {grouped.map(({ workspace, items }) => ( { const { t } = useTranslation() @@ -84,11 +86,11 @@ const Conversation: FC = () => { if (shareToken && token) { getExperienceConfig(token) .then(res => { - const response = res as { variables: Variable[]; features: FeaturesConfigForm; app_type: string; memory?: boolean; } + const response = res as { variables: Variable[]; features: FeaturesConfigForm; app_type: string; memory: boolean; } toolbarRef.current?.setVariables(response.variables || []) setConfig(response) setFeatures(response.features) - setIsHasMemory((response.app_type === 'workflow' && response.memory) || (response.app_type !== 'workflow')) + setIsHasMemory((response.app_type === 'workflow' && response.memory) || response.memory) }) } else { setChatList([]) @@ -375,6 +377,17 @@ const Conversation: FC = () => { }) } + const handleChangeVariables = (variables: Variable[]) => { + setChatList(prev => { + const firstMsg = prev[0] + console.log('firstMsg', firstMsg) + if (firstMsg && firstMsg.role === 'assistant' && firstMsg.content && features?.opening_statement.enabled && features?.opening_statement.statement && variables.length > 0) { + firstMsg.content = replaceVariables(features?.opening_statement.statement, variables as unknown as AppVariable[]) + } + return [firstMsg, ...prev.slice(1)] + }) + } + console.log('chatList', chatList) return ( @@ -460,7 +473,8 @@ const Conversation: FC = () => { } }} rightExtra={ - + (features?.web_search?.enabled || isHasMemory) + ? {features?.web_search?.enabled && { } + : undefined } + onVariablesChange={handleChangeVariables} />
diff --git a/web/src/views/EmotionEngine/index.tsx b/web/src/views/EmotionEngine/index.tsx index 5784a82f..8c0188da 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-25 18:28:18 + * @Last Modified time: 2026-03-26 15:43:29 */ /** * Emotion Engine Configuration Page @@ -118,8 +118,8 @@ const EmotionEngine: React.FC = () => { } return ( - - + + { } - className="rb:h-[calc(100vh-76px)]!" + className="rb:h-full!" bodyClassName="rb:h-[calc(100%-54px)] rb:overflow-y-auto! rb:p-3! rb:pt-0!" > { - + diff --git a/web/src/views/ForgettingEngine/index.tsx b/web/src/views/ForgettingEngine/index.tsx index 2386d070..0b15867e 100644 --- a/web/src/views/ForgettingEngine/index.tsx +++ b/web/src/views/ForgettingEngine/index.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 17:00:12 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 18:29:00 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-26 15:47:37 */ /** * Forgetting Engine Configuration Page @@ -155,8 +155,8 @@ const ForgettingEngine: React.FC = () => { } return ( - - + + @@ -165,7 +165,7 @@ const ForgettingEngine: React.FC = () => { } headerType="borderless" headerClassName="rb:min-h-[54px]! rb:font-[MiSans-Bold] rb:font-bold" - className="rb:h-[calc(100vh-76px)]!" + className="rb:h-full!" bodyClassName="rb:h-[calc(100%-54px)] rb:overflow-y-auto! rb:p-3! rb:pt-0!" >
{
- + = ({ chartData, loading }) => { > {loading ? - : + : } ) diff --git a/web/src/views/Index/components/GuideCard.tsx b/web/src/views/Index/components/GuideCard.tsx index f1cbc06c..1d6472ae 100644 --- a/web/src/views/Index/components/GuideCard.tsx +++ b/web/src/views/Index/components/GuideCard.tsx @@ -75,7 +75,7 @@ const GuideCard: React.FC = () => {
diff --git a/web/src/views/KnowledgeBase/[knowledgeBaseId]/DocumentDetails.tsx b/web/src/views/KnowledgeBase/[knowledgeBaseId]/DocumentDetails.tsx index 8859a8c8..f3716cd3 100644 --- a/web/src/views/KnowledgeBase/[knowledgeBaseId]/DocumentDetails.tsx +++ b/web/src/views/KnowledgeBase/[knowledgeBaseId]/DocumentDetails.tsx @@ -7,7 +7,7 @@ * @LastEditTime: 2025-12-19 20:19:59 */ import { useEffect, useState, useRef, type FC } from 'react'; -import { useNavigate, useParams, useLocation } from 'react-router-dom'; +import { useNavigate, useParams, useLocation, useSearchParams } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useBreadcrumbManager, type BreadcrumbPath } from '@/hooks/useBreadcrumbManager'; import { Button, Spin, message, Switch } from 'antd'; @@ -29,11 +29,16 @@ const DocumentDetails: FC = () => { const { updateBreadcrumbs } = useBreadcrumbManager({ breadcrumbType: 'detail' }); + const [searchParams] = useSearchParams(); const { documentId, parentId: locationParentId, breadcrumbPath - } = (location.state || {}) as { + } = ({ + documentId: searchParams.get('documentId') ?? undefined, + parentId: searchParams.get('parentId') ?? undefined, + ...(location.state || {}) + }) as { documentId?: string; parentId?: string; breadcrumbPath?: BreadcrumbPath; diff --git a/web/src/views/MemberManagement/index.tsx b/web/src/views/MemberManagement/index.tsx index f1f6c0b5..f846a310 100644 --- a/web/src/views/MemberManagement/index.tsx +++ b/web/src/views/MemberManagement/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:42:12 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 16:25:23 + * @Last Modified time: 2026-03-26 15:48:43 */ /** * Member Management Page @@ -105,7 +105,7 @@ const MemberManagement: React.FC = () => { ]; return ( -
+
} @@ -281,6 +281,7 @@ const Result: FC = ({ loading, handleSave }) => { onClick={handleRun} >{t('memoryExtractionEngine.debug')} } + className="rb:h-full!" > {/* } className="rb:mb-3!"> {t('memoryExtractionEngine.warning')} diff --git a/web/src/views/MemoryExtractionEngine/index.tsx b/web/src/views/MemoryExtractionEngine/index.tsx index 34596711..8e933610 100644 --- a/web/src/views/MemoryExtractionEngine/index.tsx +++ b/web/src/views/MemoryExtractionEngine/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:30:02 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-24 14:07:35 + * @Last Modified time: 2026-03-26 15:45:42 */ /** * Memory Extraction Engine Configuration Page @@ -123,10 +123,10 @@ const MemoryExtractionEngine: FC = () => { - - -
- + + + +
{ - + {
- + {data.map((item) => ( - + <> + -
+
{activeTab === 'group' && } {activeTab === 'list' && customModelModalRef.current?.handleClose() } />} {activeTab === 'square' && } @@ -145,7 +145,7 @@ const tabKeys = ['group', 'list', 'square'] ref={customModelModalRef} refresh={handleRefresh} /> - + ) } diff --git a/web/src/views/ModelManagement/utils.ts b/web/src/views/ModelManagement/utils.ts index 23e1e4f3..82ff470b 100644 --- a/web/src/views/ModelManagement/utils.ts +++ b/web/src/views/ModelManagement/utils.ts @@ -2,17 +2,17 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:50:22 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 14:03:13 + * @Last Modified time: 2026-03-25 18:35:13 */ /** * Utility functions for Model Management */ -import bedrockIcon from '@/assets/images/model/bedrock.svg' +import bedrockIcon from '@/assets/images/model/bedrock.png' import dashscopeIcon from '@/assets/images/model/dashscope.png' import gpustackIcon from '@/assets/images/model/gpustack.png' -import ollamaIcon from '@/assets/images/model/ollama.svg' -import openaiIcon from '@/assets/images/model/openai.svg' +import ollamaIcon from '@/assets/images/model/ollama.png' +import openaiIcon from '@/assets/images/model/openai.png' import xinferenceIcon from '@/assets/images/model/xinference.svg' import volcanoIcon from '@/assets/images/model/volcano.png' diff --git a/web/src/views/Ontology/pages/Detail.tsx b/web/src/views/Ontology/pages/Detail.tsx index fdf33105..cf26867e 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-25 12:16:23 + * @Last Modified time: 2026-03-26 18:55:37 */ import { type FC, useEffect, useState, useRef } from 'react' import { useParams, useNavigate } from 'react-router-dom'; @@ -100,58 +100,60 @@ const Detail: FC = () => { return ( <> - - {data.scene_name} - {data.is_system_default ? {t('common.default')} : undefined} - -
-
- } - extra={ - {data.is_system_default ? undefined : ( - - - )} - navigate(-1)}> -
- {t('common.return')} -
-
} - /> + + + {data.scene_name} + {data.is_system_default ? {t('common.default')} : undefined} + +
+
+ } + extra={ + {data.is_system_default ? undefined : ( + + + )} + navigate(-1)}> +
+ {t('common.return')} +
+
} + /> -
- - - setQuery({ class_name: value })} - className="rb:w-full!" - /> - - - - - {data.items?.map(item => ( - - handleDelete(item)} - >
)} - > - -
{item.class_description}
-
- - - ))} +
+ + + setQuery({ class_name: value })} + className="rb:w-full!" + /> + - -
+ + + {data.items?.map(item => ( + + handleDelete(item)} + >
)} + > + +
{item.class_description}
+
+ + + ))} + + +
+
= ({ return (
{title}
-
{desc}
+
{desc}
) } diff --git a/web/src/views/Prompt/index.tsx b/web/src/views/Prompt/index.tsx index 98718b12..739a73f4 100644 --- a/web/src/views/Prompt/index.tsx +++ b/web/src/views/Prompt/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:44:15 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-20 13:52:09 + * @Last Modified time: 2026-03-26 14:31:50 */ /** * Prompt Editor Component @@ -193,7 +193,7 @@ const Prompt: FC = () => { bodyClassName="rb:px-4! rb:pt-0! rb:pb-3!" > } data={chatList || []} @@ -275,10 +275,10 @@ const Prompt: FC = () => { {values?.current_prompt ? form.setFieldValue('current_prompt', value)} /> - : + : }
diff --git a/web/src/views/Prompt/pages/History.tsx b/web/src/views/Prompt/pages/History.tsx index 7953af0f..65bf9a8b 100644 --- a/web/src/views/Prompt/pages/History.tsx +++ b/web/src/views/Prompt/pages/History.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:44:04 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 12:18:09 + * @Last Modified time: 2026-03-26 14:36:33 */ /** * Prompt History Component @@ -126,6 +126,7 @@ const History: React.FC = () => {
)} + heightClass="rb:h-[calc(100vh-126px)]!" /> { } return ( - - + + @@ -179,7 +179,7 @@ const SelfReflectionEngine: React.FC = () => { } headerType="borderless" headerClassName="rb:min-h-[54px]! rb:font-[MiSans-Bold] rb:font-bold" - className="rb:h-[calc(100vh-76px)]!" + className="rb:h-full!" bodyClassName="rb:h-[calc(100%-54px)] rb:overflow-y-auto! rb:p-4! rb:pt-0!" >
{
- - + + @@ -346,7 +346,7 @@ const SelfReflectionEngine: React.FC = () => { )} } - +
); diff --git a/web/src/views/SpaceManagement/index.tsx b/web/src/views/SpaceManagement/index.tsx index 0df3c653..781ee903 100644 --- a/web/src/views/SpaceManagement/index.tsx +++ b/web/src/views/SpaceManagement/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:48:59 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 15:33:38 + * @Last Modified time: 2026-03-26 14:43:20 */ /** * Space Management Page @@ -12,7 +12,7 @@ import React, { useEffect, useState, useRef } from 'react'; import { useNavigate } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; -import { List, Button, Flex, Space as AntSpace, Tooltip } from 'antd'; +import { Button, Flex, Space as AntSpace, Tooltip, Row, Col } from 'antd'; import type { Space, SpaceModalRef } from './types'; import SpaceModal from './components/SpaceModal'; @@ -68,11 +68,12 @@ const SpaceManagement: React.FC = () => { {t('space.createSpace')} - ( - + + {data.map(item => ( + { } > - - )} - className="rb:h-[calc(100vh-124px)] rb:overflow-y-auto rb:overflow-x-hidden" - /> + + ))} +
ReactNo return ( <> - ( - + + {data.map((item) => ( + @@ -109,7 +109,6 @@ const Custom = forwardRef ReactNo } isNeedTooltip={false} > - {item.tags?.length > 0 ? @@ -142,10 +141,9 @@ const Custom = forwardRef ReactNo - - )} - className="rb:h-[calc(100vh-178px)] rb:overflow-y-auto rb:overflow-x-hidden" - /> + + ))} + {/* 添加服务弹窗组件 */} diff --git a/web/src/views/ToolManagement/Inner.tsx b/web/src/views/ToolManagement/Inner.tsx index 689ce43e..004b0517 100644 --- a/web/src/views/ToolManagement/Inner.tsx +++ b/web/src/views/ToolManagement/Inner.tsx @@ -1,6 +1,5 @@ import React, { useState, useRef, useEffect, type ReactNode } from 'react'; import { - List, Flex, Space, Tooltip, @@ -68,13 +67,14 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s } return ( -
+ <> - ( - + + {data.map((item) => ( + @@ -130,21 +130,20 @@ const Inner: React.FC<{ getStatusTag: (status: string) => ReactNode; keyword?: s : item.config_data.tool_class === 'JsonTool' - ? + ?
{t('tool.jsonEg')}
{InnerConfigData[item.config_data.tool_class].eg} - : -
{t('configStatus')}
- {t(`tool.${item.status}_desc`)} - + : +
{t('configStatus')}
+ {t(`tool.${item.status}_desc`)} + }
-
- )} - className="rb:h-[calc(100vh-178px)] rb:overflow-y-auto rb:overflow-x-hidden" - /> + + ))} +
ReactNode; keyword?: s ref={innerToolModalRef} refreshTable={getData} /> -
+ ); }; diff --git a/web/src/views/ToolManagement/Market.tsx b/web/src/views/ToolManagement/Market.tsx index 3e2ca456..2c2cb6a9 100644 --- a/web/src/views/ToolManagement/Market.tsx +++ b/web/src/views/ToolManagement/Market.tsx @@ -434,7 +434,7 @@ const Market: React.FC<{ getStatusTag?: (status: string) => ReactNode }> = () => footer={ {mcp.publisher && {mcp.publisher.startsWith('@') ? mcp.publisher : `@${mcp.publisher}`}} {mcp.view_count && -
+
{mcp.view_count.toLocaleString()}
}
} diff --git a/web/src/views/ToolManagement/Mcp.tsx b/web/src/views/ToolManagement/Mcp.tsx index eb9b45ad..a365bfb3 100644 --- a/web/src/views/ToolManagement/Mcp.tsx +++ b/web/src/views/ToolManagement/Mcp.tsx @@ -1,11 +1,11 @@ import { useState, useRef, useEffect, forwardRef, useImperativeHandle, type ReactNode } from 'react'; import { App, - List, Space, Tooltip, Dropdown, Flex, + Row, Col, } from 'antd'; import { useTranslation } from 'react-i18next'; @@ -84,11 +84,12 @@ const Mcp = forwardRef ReactNode; ke return ( <> - ( - + + {data.map((item) => ( + @@ -137,12 +138,12 @@ const Mcp = forwardRef ReactNode; ke
{t('tool.last_health_check')}: {formatDateTime(item.config_data?.last_health_check)}
- + - - )} - className="rb:h-[calc(100vh-124px)] rb:overflow-y-auto rb:overflow-x-hidden" - /> + + ))} + + {/* 添加服务弹窗组件 */} diff --git a/web/src/views/UserManagement/index.tsx b/web/src/views/UserManagement/index.tsx index 4f7aea92..2ffdc91b 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-25 16:45:18 + * @Last Modified time: 2026-03-26 14:53:41 */ /** * User Management Page @@ -142,7 +142,7 @@ const UserManagement: React.FC = () => { ]; return ( -
+
{t('user.userList')}
); } \ No newline at end of file diff --git a/web/src/views/UserMemoryDetail/Neo4j.tsx b/web/src/views/UserMemoryDetail/Neo4j.tsx index 6dde8d69..51be7c8d 100644 --- a/web/src/views/UserMemoryDetail/Neo4j.tsx +++ b/web/src/views/UserMemoryDetail/Neo4j.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 17:57:26 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-09 14:28:34 + * @Last Modified time: 2026-03-26 18:59:53 */ /** * Neo4j User Memory Detail View @@ -75,7 +75,7 @@ const Neo4j: FC = () => { return (
setSelectedKey(null)}> - + { }) } return ( - +
{name?.[0]}
diff --git a/web/src/views/UserMemoryDetail/components/AboutMe.tsx b/web/src/views/UserMemoryDetail/components/AboutMe.tsx index f38ef30a..72b9af61 100644 --- a/web/src/views/UserMemoryDetail/components/AboutMe.tsx +++ b/web/src/views/UserMemoryDetail/components/AboutMe.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:34:23 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-11 15:03:05 + * @Last Modified time: 2026-03-27 11:09:52 */ /** * About Me Component @@ -67,12 +67,12 @@ const AboutMe = forwardRef(({ className }, title={t('userMemory.aboutMe')} headerClassName="rb:min-h-[46px]!! rb:font-medium!" className={clsx("rb:bg-[#FFFFFF]! rb:shadow-[0px_2px_6px_0px_rgba(33,35,50,0.13)]! rb:absolute! rb:w-100 rb:top-29 rb:left-26", className)} - bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-176px)] rb:overflow-y-auto!" + bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-186px)]! rb:overflow-y-auto!" > {loading ? : Object.keys(data).filter(key => data[key] !== null).length > 0 - ? <> + ?
{data.user_summary &&
{data.user_summary} @@ -95,7 +95,7 @@ const AboutMe = forwardRef(({ className }, {data.one_sentence && {data.one_sentence} } - +
: } diff --git a/web/src/views/UserMemoryDetail/components/ActivationMetricsPieCard.tsx b/web/src/views/UserMemoryDetail/components/ActivationMetricsPieCard.tsx index 759a4bd7..211d5968 100644 --- a/web/src/views/UserMemoryDetail/components/ActivationMetricsPieCard.tsx +++ b/web/src/views/UserMemoryDetail/components/ActivationMetricsPieCard.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:34:16 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 11:36:02 + * @Last Modified time: 2026-03-27 11:22:10 */ import { type FC } from 'react' import { useTranslation } from 'react-i18next' @@ -32,7 +32,7 @@ const ActivationMetricsPieCard: FC = ({ chartData className="rb:h-full!" > {loading - ? + ? : { return ( url={getRagContentUrl} diff --git a/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx b/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx index 0533efc8..c689bf72 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-24 17:55:02 + * @Last Modified time: 2026-03-27 11:11:09 */ /** * End User Profile Component @@ -85,7 +85,7 @@ const EndUserProfile = forwardRef(({ cla } headerClassName="rb:min-h-[46px]!! rb:font-medium!" className={clsx("rb:bg-[#FFFFFF]! rb:shadow-[0px_2px_6px_0px_rgba(33,35,50,0.13)]! rb:absolute! rb:w-80 rb:top-29 rb:left-26", className)} - bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-176px)] rb:overflow-auto" + bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-186px)] rb:overflow-auto" > {loading ? diff --git a/web/src/views/UserMemoryDetail/components/Habits.tsx b/web/src/views/UserMemoryDetail/components/Habits.tsx index f5ccab03..90b687ff 100644 --- a/web/src/views/UserMemoryDetail/components/Habits.tsx +++ b/web/src/views/UserMemoryDetail/components/Habits.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:33:06 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 14:05:10 + * @Last Modified time: 2026-03-27 11:18:47 */ import { useEffect, useState, forwardRef, useImperativeHandle } from 'react' import { useTranslation } from 'react-i18next' @@ -83,7 +83,7 @@ const Habits = forwardRef<{ handleRefresh: () => void; }>((_props, ref) => { headerType="borderless" headerClassName="rb:min-h-[54px]! rb:font-[MiSans-Bold] rb:font-bold" bodyClassName="rb:p-3! rb:pt-0! rb:h-[calc(100%-54px)] rb:overflow-y-auto!" - className="rb:h-[calc(100vh-88px)]!" + className="rb:h-full!" > {loading ? diff --git a/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx b/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx index 8d5457cd..c10719de 100644 --- a/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx +++ b/web/src/views/UserMemoryDetail/components/InterestDistribution.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:32:47 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-05 18:29:29 + * @Last Modified time: 2026-03-27 11:11:35 */ /** * Interest Distribution Component @@ -77,7 +77,7 @@ const InterestDistribution: FC<{ className?: string; }> = ({ className }) => { title={t('userMemory.interestDistribution')} headerClassName="rb:min-h-[46px]!! rb:font-medium!" className={clsx("rb:bg-[#FFFFFF]! rb:shadow-[0px_2px_6px_0px_rgba(33,35,50,0.13)]! rb:absolute! rb:w-100 rb:top-29 rb:left-26", className)} - bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-176px)] rb:overflow-auto" + bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-186px)] rb:overflow-auto" > {loading ? diff --git a/web/src/views/UserMemoryDetail/components/MemoryInsight.tsx b/web/src/views/UserMemoryDetail/components/MemoryInsight.tsx index 578c8823..4b7274b1 100644 --- a/web/src/views/UserMemoryDetail/components/MemoryInsight.tsx +++ b/web/src/views/UserMemoryDetail/components/MemoryInsight.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:32:41 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-05 18:35:01 + * @Last Modified time: 2026-03-27 11:11:46 */ /** * Memory Insight Component @@ -66,7 +66,7 @@ const MemoryInsight = forwardRef(({ c title={t('userMemory.memoryInsight')} headerClassName="rb:min-h-[46px]!! rb:font-medium!" className={clsx("rb:bg-[#FFFFFF]! rb:shadow-[0px_2px_6px_0px_rgba(33,35,50,0.13)]! rb:absolute! rb:w-100 rb:top-29 rb:left-26", className)} - bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-176px)] rb:overflow-auto" + bodyClassName="rb:px-5! rb:pb-5! rb:pt-3.75! rb:max-h-[calc(100vh-186px)] rb:overflow-auto" > {loading ? diff --git a/web/src/views/UserMemoryDetail/components/PerceptualLastInfo.tsx b/web/src/views/UserMemoryDetail/components/PerceptualLastInfo.tsx index 3330f5bc..d4a3dcd7 100644 --- a/web/src/views/UserMemoryDetail/components/PerceptualLastInfo.tsx +++ b/web/src/views/UserMemoryDetail/components/PerceptualLastInfo.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:32:23 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 12:09:53 + * @Last Modified time: 2026-03-27 11:13:27 */ import { type FC, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -119,7 +119,7 @@ const PerceptualLastInfo: FC = () => { headerType="borderless" headerClassName="rb:min-h-[50px]! rb:font-[MiSans-Bold] rb:font-bold" bodyClassName="rb:p-4! rb:pt-0! rb:h-[calc(100%-50px)] rb:overflow-y-auto" - className="rb:h-[calc(100vh-88px)]! rb:w-full!" + className="rb:h-full! rb:w-full!" > {Object.keys(KEYS).map(key => ( diff --git a/web/src/views/UserMemoryDetail/components/RecentTrendsLineCard.tsx b/web/src/views/UserMemoryDetail/components/RecentTrendsLineCard.tsx index d3170114..18de43a0 100644 --- a/web/src/views/UserMemoryDetail/components/RecentTrendsLineCard.tsx +++ b/web/src/views/UserMemoryDetail/components/RecentTrendsLineCard.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 18:32:07 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 11:49:29 + * @Last Modified time: 2026-03-27 11:23:11 */ import { type FC, useRef } from 'react' import { useTranslation } from 'react-i18next' @@ -72,7 +72,7 @@ const RecentTrendsLineCard: FC = ({ chartData, series className="rb:h-full!" > {loading - ? + ? : !chartData || chartData.length === 0 ? : { headerType="borderless" headerClassName="rb:min-h-[54px]! rb:font-[MiSans-Bold] rb:font-bold" bodyClassName="rb:pl-5! rb:pt-0! rb:pr-3! rb:pb-4! rb:h-[calc(100%-54px)] rb:overflow-y-auto" - className="rb:h-[calc(100vh-88px)]!" + className="rb:h-full!" > {loading ? diff --git a/web/src/views/UserMemoryDetail/pages/EpisodicDetail.tsx b/web/src/views/UserMemoryDetail/pages/EpisodicDetail.tsx index ca6d456e..647cc104 100644 --- a/web/src/views/UserMemoryDetail/pages/EpisodicDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/EpisodicDetail.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-01-08 19:46:02 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:03:50 + * @Last Modified time: 2026-03-27 11:20:40 */ import { type FC, useEffect, useState } from 'react' import clsx from 'clsx' @@ -148,15 +148,15 @@ const EpisodicDetail: FC = () => { } return ( - - + + {t('episodicDetail.curResult')} ({data.total || 0}{t('episodicDetail.unix')})
} headerType="borderless" - className="rb:h-[calc(100vh-88px)]!" + className="rb:h-full!" headerClassName="rb:min-h-[38px]! rb:pt-3! rb:mb-0!" bodyClassName="rb:p-3! rb:pb-0! rb:h-[calc(100%-38px)]!" > @@ -231,11 +231,11 @@ const EpisodicDetail: FC = () => { }
- + diff --git a/web/src/views/UserMemoryDetail/pages/ExplicitDetail.tsx b/web/src/views/UserMemoryDetail/pages/ExplicitDetail.tsx index 4795ef45..185ed02d 100644 --- a/web/src/views/UserMemoryDetail/pages/ExplicitDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/ExplicitDetail.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-01-10 17:35:17 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:05:06 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-27 11:19:38 */ import { type FC, useEffect, useState, useRef } from 'react' import { useTranslation } from 'react-i18next' @@ -132,14 +132,14 @@ const ExplicitDetail: FC = () => { return () => { chartInstance.current?.dispose(); chartInstance.current = null } }, [data.semantic_memories]) return ( - - + + {loading ? @@ -163,13 +163,13 @@ const ExplicitDetail: FC = () => { } - + {loading ? diff --git a/web/src/views/UserMemoryDetail/pages/GraphDetail.tsx b/web/src/views/UserMemoryDetail/pages/GraphDetail.tsx index f8282687..19f49ff0 100644 --- a/web/src/views/UserMemoryDetail/pages/GraphDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/GraphDetail.tsx @@ -113,13 +113,13 @@ const GraphDetail = forwardRef((_props, ref) => { } /> - + @@ -127,13 +127,13 @@ const GraphDetail = forwardRef((_props, ref) => { - + ((_props, ref) => { }))} onChange={(key: string) => setActiveTab(key)} /> -
+
{timelineLoading ? : !activeContent || activeContent.length === 0 diff --git a/web/src/views/UserMemoryDetail/pages/ImplicitDetail.tsx b/web/src/views/UserMemoryDetail/pages/ImplicitDetail.tsx index 2448ff90..8dd71dc2 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-25 11:56:55 + * @Last Modified time: 2026-03-27 11:18:50 */ import { forwardRef, useImperativeHandle, useRef, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -83,41 +83,39 @@ const ImplicitDetail = forwardRef<{ handleRefresh: () => void; }, { refresh: () } return ( -
- - - - + + + + -
- {activeTab === 'preferences' - ? - :
- - -
- } -
-
- - - - -
-
+
+ {activeTab === 'preferences' + ? + :
+ + +
+ } +
+ + + + + + ) }) export default ImplicitDetail \ No newline at end of file diff --git a/web/src/views/UserMemoryDetail/pages/PerceptualDetail.tsx b/web/src/views/UserMemoryDetail/pages/PerceptualDetail.tsx index 8871d9c3..ce76c899 100644 --- a/web/src/views/UserMemoryDetail/pages/PerceptualDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/PerceptualDetail.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-01-08 19:46:02 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:09:12 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-27 11:13:19 */ import { type FC } from 'react' import { Row, Col } from 'antd' @@ -22,11 +22,11 @@ import Timeline from '../components/Timeline' const PerceptualDetail: FC = () => { return ( - - + + - + diff --git a/web/src/views/UserMemoryDetail/pages/ShortTermDetail.tsx b/web/src/views/UserMemoryDetail/pages/ShortTermDetail.tsx index 8b38aa54..07a27720 100644 --- a/web/src/views/UserMemoryDetail/pages/ShortTermDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/ShortTermDetail.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-01-08 19:46:02 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:09:49 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-27 11:17:22 */ import { type FC, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -87,8 +87,8 @@ const ShortTermDetail: FC = () => { } return ( - - + +
{(['retrieval_number', 'entity', 'long_term_number'] as const).map(key => ( @@ -115,10 +115,10 @@ const ShortTermDetail: FC = () => { )} headerType="borderless" headerClassName="rb:min-h-[54px]! rb:font-[MiSans-Bold] rb:font-bold" - bodyClassName="rb:p-3! rb:pt-0! rb:h-[calc(100%-54px)] rb:overflow-y-auto!" - className="rb:h-[calc(100vh-183px)]!" + bodyClassName="rb:p-3! rb:pt-0! rb:h-[calc(100%-54px)]" + className="rb:h-[calc(100%-94px)]!" > - + {loading ? : !data.short_term || data.short_term.length === 0 @@ -189,7 +189,7 @@ const ShortTermDetail: FC = () => { - + ( {t('shortTermDetail.longTermTitle')} @@ -200,7 +200,7 @@ const ShortTermDetail: FC = () => { headerType="borderless" headerClassName="rb:min-h-[54px]! rb:font-[MiSans-Bold] rb:font-bold" bodyClassName="rb:p-3! rb:pt-0! rb:h-[calc(100%-54px)] rb:overflow-y-auto!" - className="rb:h-[calc(100vh-88px)]!" + className="rb:h-full!" > {loading diff --git a/web/src/views/UserMemoryDetail/pages/StatementDetail.tsx b/web/src/views/UserMemoryDetail/pages/StatementDetail.tsx index d8feab1f..419cf3b1 100644 --- a/web/src/views/UserMemoryDetail/pages/StatementDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/StatementDetail.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2025-12-19 16:54:52 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-16 15:06:29 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-03-27 11:35:37 */ import { forwardRef, useImperativeHandle, useRef } from 'react' import { Row, Col } from 'antd'; @@ -46,8 +46,8 @@ const StatementDetail = forwardRef<{ handleRefresh: () => void },{ refresh: () = handleRefresh })); return ( - - + + @@ -60,7 +60,7 @@ const StatementDetail = forwardRef<{ handleRefresh: () => void },{ refresh: () = - + diff --git a/web/src/views/UserMemoryDetail/pages/WorkingDetail.tsx b/web/src/views/UserMemoryDetail/pages/WorkingDetail.tsx index bfe928be..2e288988 100644 --- a/web/src/views/UserMemoryDetail/pages/WorkingDetail.tsx +++ b/web/src/views/UserMemoryDetail/pages/WorkingDetail.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-01-12 14:42:02 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 11:55:36 + * @Last Modified time: 2026-03-27 11:15:05 */ import { type FC, useEffect, useState, useMemo, useRef } from 'react' import clsx from 'clsx' @@ -155,14 +155,14 @@ const WorkingDetail: FC = () => { : data.length === 0 ? :( - - + +
{ {selected && <> - +
{timeRange}
@@ -226,13 +226,13 @@ const WorkingDetail: FC = () => { }
- + {detailLoading ? diff --git a/web/src/views/Workflow/components/NodeLibrary.tsx b/web/src/views/Workflow/components/NodeLibrary.tsx index b825650a..464db64e 100644 --- a/web/src/views/Workflow/components/NodeLibrary.tsx +++ b/web/src/views/Workflow/components/NodeLibrary.tsx @@ -10,7 +10,7 @@ const NodeLibrary: FC<{ collapsed: boolean; handleToggle: () => void }> = ({ col const { t } = useTranslation() return ( -
@@ -27,9 +27,9 @@ const NodeLibrary: FC<{ collapsed: boolean; handleToggle: () => void }> = ({ col 'rb:min-h-[52px]!': collapsed })} className="rb:h-full! rb:hover:shadow-none!" - bodyClassName={clsx('rb:overflow-y-auto! rb:h-[calc(100vh-126px)]! rb:pt-0! rb:pb-3!', { - 'rb:px-0!': collapsed, - 'rb:px-3!': !collapsed + bodyClassName={clsx('rb:overflow-y-auto! rb:pt-0! rb:pb-3!', { + 'rb:px-0! rb:h-[calc(100%-52px)]!': collapsed, + 'rb:px-3! rb:h-[calc(100%-42px)]!': !collapsed })} > @@ -87,8 +87,6 @@ const NodeLibrary: FC<{ collapsed: boolean; handleToggle: () => void }> = ({ col } - -
); }; diff --git a/web/src/views/Workflow/components/Properties/index.tsx b/web/src/views/Workflow/components/Properties/index.tsx index bb80ed33..66b59075 100644 --- a/web/src/views/Workflow/components/Properties/index.tsx +++ b/web/src/views/Workflow/components/Properties/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 15:39:59 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-25 15:08:02 + * @Last Modified time: 2026-03-27 11:30:44 */ import { type FC, useEffect, useState, useMemo } from "react"; import clsx from 'clsx' @@ -431,7 +431,7 @@ const Properties: FC = ({ } return ( -
+
@@ -452,7 +452,7 @@ const Properties: FC = ({ headerType="borderless" headerClassName={clsx("rb:font-[MiSans-Bold] rb:font-bold rb:min-h-[48px]!")} className="rb:h-full! rb:hover:shadow-none!" - bodyClassName={clsx('rb:overflow-y-auto! rb:h-[calc(100vh-131px)]! rb:px-3! rb:pt-0! rb:pb-3!')} + bodyClassName={clsx('rb:overflow-y-auto! rb:h-[calc(100%-48px)]! rb:px-3! rb:pt-0! rb:pb-3!')} >
diff --git a/web/src/views/Workflow/hooks/useWorkflowGraph.ts b/web/src/views/Workflow/hooks/useWorkflowGraph.ts index 197e4e4b..135a0891 100644 --- a/web/src/views/Workflow/hooks/useWorkflowGraph.ts +++ b/web/src/views/Workflow/hooks/useWorkflowGraph.ts @@ -100,6 +100,7 @@ export const useWorkflowGraph = ({ const [isHandMode, setIsHandMode] = useState(true); const [config, setConfig] = useState(null); const [chatVariables, setChatVariables] = useState([]) + const featuresRef = useRef(undefined) useEffect(() => { getConfig() @@ -121,6 +122,7 @@ export const useWorkflowGraph = ({ }) setChatVariables(initChatVariables) setConfig({ ...rest, variables: initChatVariables }) + featuresRef.current = rest.features onFeaturesLoad?.(rest.features) }) } @@ -1016,6 +1018,7 @@ export const useWorkflowGraph = ({ const params = { ...config, + features: featuresRef.current, variables: chatVariables.map(v => { const { defaultValue, ...cleanV } = v return { @@ -1208,7 +1211,7 @@ export const useWorkflowGraph = ({ }); } const handleSaveFeaturesConfig = (value?: FeaturesConfigForm) => { - setConfig(prev => prev ? { ...prev, features: value } as WorkflowConfig : prev) + featuresRef.current = value } return { diff --git a/web/src/views/Workflow/index.tsx b/web/src/views/Workflow/index.tsx index d5d46a55..1fd6535d 100644 --- a/web/src/views/Workflow/index.tsx +++ b/web/src/views/Workflow/index.tsx @@ -60,7 +60,7 @@ const Workflow = forwardRef +
{/* 左侧节点面板 */}