| @@ -0,0 +1,5 @@ | |||
| import { BlockEnum } from './types' | |||
| export const ALL_AVAILABLE_BLOCKS = Object.values(BlockEnum) | |||
| export const ALL_CHAT_AVAILABLE_BLOCKS = ALL_AVAILABLE_BLOCKS.filter(key => key !== BlockEnum.End && key !== BlockEnum.Start) as BlockEnum[] | |||
| export const ALL_COMPLETION_AVAILABLE_BLOCKS = ALL_AVAILABLE_BLOCKS.filter(key => key !== BlockEnum.Answer && key !== BlockEnum.Start) as BlockEnum[] | |||
| @@ -203,9 +203,6 @@ export const NODES_EXTRA_DATA: Record<BlockEnum, NodesExtraData> = { | |||
| } | |||
| export const ALL_CHAT_AVAILABLE_BLOCKS = Object.keys(NODES_EXTRA_DATA).filter(key => key !== BlockEnum.End && key !== BlockEnum.Start) as BlockEnum[] | |||
| export const ALL_COMPLETION_AVAILABLE_BLOCKS = Object.keys(NODES_EXTRA_DATA).filter(key => key !== BlockEnum.Answer && key !== BlockEnum.Start) as BlockEnum[] | |||
| export const NODES_INITIAL_DATA = { | |||
| [BlockEnum.Start]: { | |||
| type: BlockEnum.Start, | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import type { AnswerNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const nodeDefault: NodeDefault<AnswerNodeType> = { | |||
| defaultValue: { | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import { type AssignerNodeType, WriteMode } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| const nodeDefault: NodeDefault<AssignerNodeType> = { | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import { CodeLanguage, type CodeNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import { type DocExtractorNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| const nodeDefault: NodeDefault<DocExtractorNodeType> = { | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import { type EndNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const nodeDefault: NodeDefault<EndNodeType> = { | |||
| defaultValue: { | |||
| @@ -5,7 +5,7 @@ import type { BodyPayload, HttpNodeType } from './types' | |||
| import { | |||
| ALL_CHAT_AVAILABLE_BLOCKS, | |||
| ALL_COMPLETION_AVAILABLE_BLOCKS, | |||
| } from '@/app/components/workflow/constants' | |||
| } from '@/app/components/workflow/blocks' | |||
| const nodeDefault: NodeDefault<HttpNodeType> = { | |||
| defaultValue: { | |||
| @@ -2,7 +2,7 @@ import { BlockEnum, type NodeDefault } from '../../types' | |||
| import { type IfElseNodeType, LogicalOperator } from './types' | |||
| import { isEmptyRelatedOperator } from './utils' | |||
| import { TransferMethod } from '@/types/app' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| const nodeDefault: NodeDefault<IfElseNodeType> = { | |||
| @@ -1,6 +1,6 @@ | |||
| import type { NodeDefault } from '../../types' | |||
| import type { IterationStartNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const nodeDefault: NodeDefault<IterationStartNodeType> = { | |||
| defaultValue: {}, | |||
| @@ -4,7 +4,7 @@ import type { IterationNodeType } from './types' | |||
| import { | |||
| ALL_CHAT_AVAILABLE_BLOCKS, | |||
| ALL_COMPLETION_AVAILABLE_BLOCKS, | |||
| } from '@/app/components/workflow/constants' | |||
| } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow' | |||
| const nodeDefault: NodeDefault<IterationNodeType> = { | |||
| @@ -2,7 +2,7 @@ import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import type { KnowledgeRetrievalNodeType } from './types' | |||
| import { checkoutRerankModelConfigedInRetrievalSettings } from './utils' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| import { DATASET_DEFAULT } from '@/config' | |||
| import { RETRIEVE_TYPE } from '@/types/app' | |||
| const i18nPrefix = 'workflow' | |||
| @@ -2,7 +2,7 @@ import { BlockEnum, VarType } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import { comparisonOperatorNotRequireValue } from '../if-else/utils' | |||
| import { type ListFilterNodeType, OrderBy } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| const nodeDefault: NodeDefault<ListFilterNodeType> = { | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum, EditionType } from '../../types' | |||
| import { type NodeDefault, type PromptItem, PromptRole } from '../../types' | |||
| import type { LLMNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import { type ParameterExtractorNodeType, ReasoningModeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow' | |||
| const nodeDefault: NodeDefault<ParameterExtractorNodeType> = { | |||
| @@ -1,7 +1,7 @@ | |||
| import type { NodeDefault } from '../../types' | |||
| import { BlockEnum } from '../../types' | |||
| import type { QuestionClassifierNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow' | |||
| @@ -1,6 +1,6 @@ | |||
| import type { NodeDefault } from '../../types' | |||
| import type { StartNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const nodeDefault: NodeDefault<StartNodeType> = { | |||
| defaultValue: { | |||
| @@ -1,7 +1,7 @@ | |||
| import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import type { TemplateTransformNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| const nodeDefault: NodeDefault<TemplateTransformNodeType> = { | |||
| @@ -2,7 +2,7 @@ import { BlockEnum } from '../../types' | |||
| import type { NodeDefault } from '../../types' | |||
| import type { ToolNodeType } from './types' | |||
| import { VarType as VarKindType } from '@/app/components/workflow/nodes/tool/types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow.errorMsg' | |||
| @@ -1,7 +1,7 @@ | |||
| import { type NodeDefault, VarType } from '../../types' | |||
| import { BlockEnum } from '../../types' | |||
| import type { VariableAssignerNodeType } from './types' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/constants' | |||
| import { ALL_CHAT_AVAILABLE_BLOCKS, ALL_COMPLETION_AVAILABLE_BLOCKS } from '@/app/components/workflow/blocks' | |||
| const i18nPrefix = 'workflow' | |||