Feat: Reference the output variable of the upstream operator #3221 (#8111)

### What problem does this PR solve?
Feat: Reference the output variable of the upstream operator #3221
### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-06-06 19:27:29 +08:00
committed by GitHub
parent 7ed9efcd4e
commit 06463135ef
3 changed files with 70 additions and 15 deletions

View File

@ -117,13 +117,9 @@ export default function VariablePickerMenuPlugin({
const [queryString, setQueryString] = React.useState<string | null>('');
const buildGroupedOptions = useBuildComponentIdSelectOptions(
node?.id,
node?.parentId,
);
const options = useBuildComponentIdSelectOptions(node?.id, node?.parentId);
const buildNextOptions = useCallback(() => {
const options = buildGroupedOptions();
let filteredOptions = options;
if (queryString) {
@ -150,11 +146,10 @@ export default function VariablePickerMenuPlugin({
);
return nextOptions;
}, [buildGroupedOptions, queryString]);
}, [options, queryString]);
const findLabelByValue = useCallback(
(value: string) => {
const options = buildGroupedOptions();
const children = options.reduce<Array<{ label: string; value: string }>>(
(pre, cur) => {
return pre.concat(cur.options);
@ -164,7 +159,7 @@ export default function VariablePickerMenuPlugin({
return children.find((x) => x.value === value)?.label;
},
[buildGroupedOptions],
[options],
);
const onSelectOption = useCallback(

View File

@ -4,9 +4,10 @@ import { DeleteOutlined } from '@ant-design/icons';
import { Button, Collapse, Flex, Input, Select, Table, TableProps } from 'antd';
import { trim } from 'lodash';
import { useBuildComponentIdSelectOptions } from '../../hooks/use-get-begin-query';
import { IInvokeVariable, RAGFlowNodeType } from '../../interface';
import { IInvokeVariable } from '../../interface';
import { useHandleOperateParameters } from './hooks';
import { RAGFlowNodeType } from '@/interfaces/database/flow';
import styles from './index.less';
interface IProps {