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:
balibabu
2026-06-09 19:41:22 +08:00
committed by GitHub
parent acae932938
commit 10bbe6b5d4
2 changed files with 12 additions and 7 deletions

View File

@@ -786,6 +786,7 @@ export const NoDebugOperatorsList = [
Operator.TitleChunker,
Operator.Extractor,
Operator.Tool,
Operator.Loop,
];
export const NoCopyOperatorsList = [

View File

@@ -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),
),
),
};