Features: Memory page rendering and other bug fixes (#11784)

### What problem does this PR solve?

Features: Memory page rendering and other bug fixes
- Rendering of the Memory list page
- Rendering of the message list page in Memory
- Fixed an issue where the empty state was incorrectly displayed when
search criteria were applied
- Added a web link for the API-Key
- modifying the index_mode attribute of the Confluence data source.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
chanx
2025-12-08 10:17:56 +08:00
committed by GitHub
parent 3285f09c92
commit 660fa8888b
55 changed files with 2047 additions and 218 deletions

View File

@ -11,23 +11,33 @@ export enum EmptyCardType {
Dataset = 'dataset',
Chat = 'chat',
Search = 'search',
Memory = 'memory',
}
export const EmptyCardData = {
[EmptyCardType.Agent]: {
icon: <HomeIcon name="agents" width={'24'} />,
title: t('empty.agentTitle'),
notFound: t('empty.notFoundAgent'),
},
[EmptyCardType.Dataset]: {
icon: <HomeIcon name="datasets" width={'24'} />,
title: t('empty.datasetTitle'),
notFound: t('empty.notFoundDataset'),
},
[EmptyCardType.Chat]: {
icon: <HomeIcon name="chats" width={'24'} />,
title: t('empty.chatTitle'),
notFound: t('empty.notFoundChat'),
},
[EmptyCardType.Search]: {
icon: <HomeIcon name="searches" width={'24'} />,
title: t('empty.searchTitle'),
notFound: t('empty.notFoundSearch'),
},
[EmptyCardType.Memory]: {
icon: <HomeIcon name="memory" width={'24'} />,
title: t('empty.memoryTitle'),
notFound: t('empty.notFoundMemory'),
},
};

View File

@ -76,9 +76,10 @@ export const EmptyAppCard = (props: {
onClick?: () => void;
showIcon?: boolean;
className?: string;
isSearch?: boolean;
size?: 'small' | 'large';
}) => {
const { type, showIcon, className } = props;
const { type, showIcon, className, isSearch } = props;
let defaultClass = '';
let style = {};
switch (props.size) {
@ -95,19 +96,29 @@ export const EmptyAppCard = (props: {
break;
}
return (
<div className=" cursor-pointer " onClick={props.onClick}>
<div
className=" cursor-pointer "
onClick={isSearch ? undefined : props.onClick}
>
<EmptyCard
icon={showIcon ? EmptyCardData[type].icon : undefined}
title={EmptyCardData[type].title}
title={
isSearch ? EmptyCardData[type].notFound : EmptyCardData[type].title
}
className={className}
style={style}
// description={EmptyCardData[type].description}
>
<div
className={cn(defaultClass, 'flex items-center justify-start w-full')}
>
<Plus size={24} />
</div>
{!isSearch && (
<div
className={cn(
defaultClass,
'flex items-center justify-start w-full',
)}
>
<Plus size={24} />
</div>
)}
</EmptyCard>
</div>
);