Feat: Set the outputs type of list operation. #10427 (#11366)

### What problem does this PR solve?

Feat: Set the outputs type of list operation. #10427

### Type of change


- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2025-11-19 13:59:43 +08:00
committed by GitHub
parent 0884e9a4d9
commit 971197d595
8 changed files with 148 additions and 42 deletions

View File

@ -8,6 +8,7 @@ import {
AgentStructuredOutputField,
CodeTemplateStrMap,
ComparisonOperator,
JsonSchemaDataType,
Operator,
ProgrammingLanguage,
SwitchOperatorOptions,
@ -610,15 +611,15 @@ export const initialListOperationsValues = {
query: '',
operations: ListOperations.TopN,
outputs: {
result: {
type: 'Array<?>',
},
first: {
type: '?',
},
last: {
type: '?',
},
// result: {
// type: 'Array<?>',
// },
// first: {
// type: '?',
// },
// last: {
// type: '?',
// },
},
};
@ -874,3 +875,22 @@ export enum ExportFileType {
Markdown = 'md',
DOCX = 'docx',
}
export enum TypesWithArray {
String = 'string',
Number = 'number',
Boolean = 'boolean',
Object = 'object',
ArrayString = 'array<string>',
ArrayNumber = 'array<number>',
ArrayBoolean = 'array<boolean>',
ArrayObject = 'array<object>',
}
export const ArrayFields = [
JsonSchemaDataType.Array,
TypesWithArray.ArrayBoolean,
TypesWithArray.ArrayNumber,
TypesWithArray.ArrayString,
TypesWithArray.ArrayObject,
];