mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Feat: In a dialog message, users can enter different types of data #3221 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -19,7 +19,7 @@ import {
|
||||
NodeMap,
|
||||
Operator,
|
||||
} from './constant';
|
||||
import { IPosition } from './interface';
|
||||
import { BeginQuery, IPosition } from './interface';
|
||||
|
||||
const buildEdges = (
|
||||
operatorIds: string[],
|
||||
@ -537,3 +537,21 @@ export function mapEdgeMouseEvent(
|
||||
|
||||
return nextEdges;
|
||||
}
|
||||
|
||||
export function buildBeginQueryWithObject(
|
||||
inputs: Record<string, BeginQuery>,
|
||||
values: BeginQuery[],
|
||||
) {
|
||||
const nextInputs = Object.keys(inputs).reduce<Record<string, BeginQuery>>(
|
||||
(pre, key) => {
|
||||
const item = values.find((x) => x.key === key);
|
||||
if (item) {
|
||||
pre[key] = { ...item };
|
||||
}
|
||||
return pre;
|
||||
},
|
||||
{},
|
||||
);
|
||||
|
||||
return nextInputs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user