feat(web): memory config & ontology add default tag

This commit is contained in:
zhaoying
2026-03-05 16:36:39 +08:00
parent 1b666638bc
commit 621b074b3d
6 changed files with 25 additions and 9 deletions

View File

@@ -454,6 +454,7 @@ export const en = {
prevStep: 'Previous Step',
exportSuccess: 'Export successful',
recommend: 'Recommend',
default: 'Default',
},
model: {
searchPlaceholder: 'search model…',

View File

@@ -1030,6 +1030,7 @@ export const zh = {
prevStep: '上一步',
exportSuccess: '导出成功',
recommend: '推荐',
default: '默认',
},
model: {
searchPlaceholder: '搜索模型…',

View File

@@ -1,8 +1,8 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-03 17:33:15
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 17:33:15
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-05 16:28:58
*/
/**
* Memory Management Page
@@ -110,9 +110,15 @@ const MemoryManagement: React.FC = () => {
<List.Item key={item.config_id}>
<RbCard
title={item.config_name}
className="rb:relative"
>
{item.is_system_default &&
<div className="rb:absolute rb:-right-px rb:-top-px rb:bg-[#FF5D34] rb:rounded-[0px_7px_0px_8px] rb:text-[12px] rb:text-white rb:font-regular rb:leading-4 rb:py-0.5 rb:px-1">
{t('common.default')}
</div>
}
<Tooltip title={item.config_desc}>
<div className="rb:text-[#5B6167] rb:text-[12px] rb:leading-4.25 rb:font-regular rb:-mt-1 rb:wrap-break-word rb:line-clamp-1 rb:h-[17px]">{item.config_desc}</div>
<div className="rb:text-[#5B6167] rb:text-[12px] rb:leading-4.25 rb:font-regular rb:-mt-1 rb:wrap-break-word rb:line-clamp-1 rb:h-4.25">{item.config_desc}</div>
</Tooltip>
<RbAlert className="rb:mt-3 ">
<div className={clsx("rb:flex rb:gap-5 rb:font-regular rb:text-[14px]")}>

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 17:33:01
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 17:33:24
* @Last Modified time: 2026-03-05 16:33:53
*/
/**
* Memory management form data type
@@ -42,6 +42,7 @@ export interface Memory {
workspace_id: string;
scene_id: string;
scene_name: string;
is_system_default: boolean;
[key: string]: string | number | boolean;
}
/**

View File

@@ -1,8 +1,8 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-03 14:10:15
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-05 10:57:53
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-05 16:28:53
*/
import { type FC, useState, useRef, type MouseEvent } from 'react';
import { useNavigate } from 'react-router-dom';
@@ -144,8 +144,13 @@ const Ontology: FC = () => {
title={item.scene_name}
extra={<Tag>{item.type_num} {t('ontology.typeCount')}</Tag>}
onClick={() => handleJump(item)}
className="rb:cursor-pointer"
className="rb:cursor-pointer rb:relative"
>
{item.is_system_default &&
<div className="rb:absolute rb:-right-px rb:-top-px rb:bg-[#FF5D34] rb:rounded-[0px_7px_0px_8px] rb:text-[12px] rb:text-white rb:font-regular rb:leading-4 rb:py-0.5 rb:px-1">
{t('common.default')}
</div>
}
<div
className="rb:flex rb:gap-2 rb:justify-between rb:text-[#5B6167] rb:text-[14px] rb:leading-5 rb:mb-3"
>

View File

@@ -1,8 +1,8 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-03 14:10:10
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-03 14:10:10
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-03-05 16:18:56
*/
/**
* Query parameters for ontology list pagination and filtering
@@ -38,6 +38,8 @@ export interface OntologyItem {
updated_at: number;
/** Total count of classes in the scene */
classes_count: number;
/** Whether this is the system default configuration */
is_system_default: boolean;
}
/**