mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix: The variables in the Visual Input File of the agent operator are not displayed. (#15856)
### What problem does this PR solve? Fix: The variables in the Visual Input File of the agent operator are not displayed. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -786,6 +786,7 @@ export const NoDebugOperatorsList = [
|
||||
Operator.TitleChunker,
|
||||
Operator.Extractor,
|
||||
Operator.Tool,
|
||||
Operator.Loop,
|
||||
];
|
||||
|
||||
export const NoCopyOperatorsList = [
|
||||
|
||||
@@ -356,7 +356,7 @@ export function useFilterQueryVariableOptionsByTypes({
|
||||
nodeIds = [],
|
||||
variablesExceptOperatorOutputs,
|
||||
}: {
|
||||
types?: JsonSchemaDataType[];
|
||||
types?: (JsonSchemaDataType | VariableType)[];
|
||||
} & BuildQueryVariableOptions) {
|
||||
const nextOptions = useBuildQueryVariableOptions({
|
||||
nodeIds,
|
||||
@@ -370,15 +370,19 @@ export function useFilterQueryVariableOptionsByTypes({
|
||||
...x,
|
||||
options: x.options.filter(
|
||||
(y) =>
|
||||
types?.some((x) =>
|
||||
toLower(x).startsWith('array')
|
||||
? toLower(y.type).includes(toLower(x))
|
||||
: toLower(y.type) === toLower(x),
|
||||
) ||
|
||||
types?.some((x) => {
|
||||
const lowerX = toLower(x);
|
||||
const lowerYType = toLower(y.type);
|
||||
return lowerX.startsWith('array')
|
||||
? lowerYType.includes(lowerX)
|
||||
: lowerYType === lowerX ||
|
||||
(lowerX === toLower(VariableType.File) &&
|
||||
lowerYType === `array<${lowerX}>`);
|
||||
}) ||
|
||||
// agent structured output
|
||||
isAgentStructured(
|
||||
y.value,
|
||||
y.value.slice(-AgentStructuredOutputField.length),
|
||||
y.value?.slice(-AgentStructuredOutputField.length),
|
||||
),
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user