Feat: Add memory multi-select dropdown to recall and message operator forms. #4213 (#12106)

### What problem does this PR solve?

Feat: Add memory multi-select dropdown to recall and message operator
forms. #4213

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-12-23 11:54:32 +08:00
committed by GitHub
parent 712d537d66
commit 9e31631d8f
10 changed files with 95 additions and 13 deletions

View File

@ -2,6 +2,7 @@ import { Collapse } from '@/components/collapse';
import { CrossLanguageFormField } from '@/components/cross-language-form-field';
import { FormContainer } from '@/components/form-container';
import { KnowledgeBaseFormField } from '@/components/knowledge-base-item';
import { MemoriesFormField } from '@/components/memories-form-field';
import {
MetadataFilter,
MetadataFilterSchema,
@ -46,6 +47,7 @@ export const RetrievalPartialSchema = {
use_kg: z.boolean(),
toc_enhance: z.boolean(),
...MetadataFilterSchema,
memory_ids: z.array(z.string()).optional(),
};
export const FormSchema = z.object({
@ -109,12 +111,11 @@ function RetrievalForm({ node }: INextOperatorForm) {
return (
<Form {...form}>
<FormWrapper>
<FormContainer>
<RAGFlowFormItem name="query" label={t('flow.query')}>
<PromptEditor></PromptEditor>
</RAGFlowFormItem>
<KnowledgeBaseFormField showVariable></KnowledgeBaseFormField>
</FormContainer>
<RAGFlowFormItem name="query" label={t('flow.query')}>
<PromptEditor></PromptEditor>
</RAGFlowFormItem>
<KnowledgeBaseFormField showVariable></KnowledgeBaseFormField>
<MemoriesFormField label={t('flow.memory')}></MemoriesFormField>
<Collapse title={<div>{t('flow.advancedSettings')}</div>}>
<FormContainer>
<SimilaritySliderFormField