Feat: Globally defined conversation variables can be selected in the operator's query variables. #10427 (#11135)

### What problem does this PR solve?

Feat: Globally defined conversation variables can be selected in the
operator's query variables. #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-10 15:09:33 +08:00
committed by GitHub
parent 2b9145948f
commit 0879b6af2c
15 changed files with 101 additions and 58 deletions

View File

@ -1,25 +0,0 @@
import { Input } from '@/components/ui/input';
import { ChangeEvent, useCallback } from 'react';
type KeyInputProps = {
value?: string;
onChange?: (value: string) => void;
searchValue?: string | RegExp;
};
export function KeyInput({
value,
onChange,
searchValue = /[^a-zA-Z0-9_]/g,
}: KeyInputProps) {
const handleChange = useCallback(
(e: ChangeEvent<HTMLInputElement>) => {
const value = e.target.value ?? '';
const filteredValue = value.replace(searchValue, '');
onChange?.(filteredValue);
},
[onChange, searchValue],
);
return <Input value={value} onChange={handleChange} />;
}

View File

@ -1,3 +1,4 @@
import { KeyInput } from '@/components/key-input';
import { SelectWithSearch } from '@/components/originui/select-with-search';
import { RAGFlowFormItem } from '@/components/ragflow-form';
import { Button } from '@/components/ui/button';
@ -8,7 +9,6 @@ import { ReactNode } from 'react';
import { useFieldArray, useFormContext } from 'react-hook-form';
import { DataOperationsOperatorOptions } from '../../constant';
import { DynamicFormHeader } from '../components/dynamic-fom-header';
import { KeyInput } from '../components/key-input';
import { PromptEditor } from '../components/prompt-editor';
type SelectKeysProps = {

View File

@ -1,3 +1,4 @@
import { KeyInput } from '@/components/key-input';
import { RAGFlowFormItem } from '@/components/ragflow-form';
import { Button } from '@/components/ui/button';
import { Separator } from '@/components/ui/separator';
@ -5,7 +6,6 @@ import { X } from 'lucide-react';
import { ReactNode } from 'react';
import { useFieldArray, useFormContext } from 'react-hook-form';
import { DynamicFormHeader } from '../components/dynamic-fom-header';
import { KeyInput } from '../components/key-input';
import { PromptEditor } from '../components/prompt-editor';
type SelectKeysProps = {