empty state

This commit is contained in:
JzoNg 2025-09-23 16:24:15 +08:00
parent 57624979e4
commit 05c05bb6d0
3 changed files with 20 additions and 1 deletions

View File

@ -15,6 +15,10 @@ import {
size,
useFloating,
} from '@floating-ui/react'
import {
RiAddLine,
} from '@remixicon/react'
import { Memory } from '@/app/components/base/icons/src/vender/line/others'
import {
$getSelection,
$isRangeSelection,
@ -231,7 +235,20 @@ export default function MemoryPopupPlugin({
</div>
</>
)}
<div>{t('workflow.nodes.llm.memory.createButton')}</div>
{!memoryVarInNode.length && !memoryVarInApp.length && (
<div className='p-2'>
<div className='flex flex-col gap-2 rounded-[10px] bg-workflow-process-bg p-4'>
<div className='flex h-10 w-10 items-center justify-center rounded-lg border-[0.5px] border-components-card-border bg-components-card-bg shadow-lg backdrop-blur-sm'>
<Memory className='h-5 w-5 text-util-colors-teal-teal-700' />
</div>
<div className='system-sm-medium text-text-secondary'>{t('workflow.nodes.llm.memory.emptyState')}</div>
</div>
</div>
)}
<div className='system-xs-medium flex items-center gap-1 border-t border-divider-subtle px-4 py-2 text-text-accent-light-mode-only'>
<RiAddLine className='h-4 w-4' />
<div>{t('workflow.nodes.llm.memory.createButton')}</div>
</div>
</div>
</div>
</div>,

View File

@ -528,6 +528,7 @@ const translation = {
addButton: 'Add Memory',
currentNodeLabel: 'Current Node scope',
conversationScopeLabel: 'Conversation scope',
emptyState: 'Create memory variables to enable Memory Block',
createButton: 'Create memory variable',
},
},

View File

@ -528,6 +528,7 @@ const translation = {
addButton: '添加记忆',
currentNodeLabel: '当前节点范围',
conversationScopeLabel: '会话范围',
emptyState: '创建记忆变量以启用记忆块',
createButton: '创建记忆变量',
},
},