wwf
2 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/workflow/types.ts
@@ -14,7 +14,6 @@
  ErrorHandleTypeEnum,
} from '@/app/components/workflow/nodes/_base/components/error-handle/types'
import type { WorkflowRetryConfig } from '@/app/components/workflow/nodes/_base/components/retry/types'
import type { StructuredOutput } from '@/app/components/workflow/nodes/llm/types'
export enum BlockEnum {
  Start = 'start',
@@ -36,10 +35,6 @@
  ListFilter = 'list-operator',
  IterationStart = 'iteration-start',
  Assigner = 'assigner', // is now named as VariableAssigner
  Agent = 'agent',
  Loop = 'loop',
  LoopStart = 'loop-start',
  LoopEnd = 'loop-end',
}
export enum ControlMode {
@@ -66,7 +61,7 @@
  _singleRunningStatus?: NodeRunningStatus
  _isCandidate?: boolean
  _isBundled?: boolean
  _children?: { nodeId: string; nodeType: BlockEnum }[]
  _children?: string[]
  _isEntering?: boolean
  _showAddVariablePopup?: boolean
  _holdAddVariablePopup?: boolean
@@ -83,10 +78,6 @@
  type: BlockEnum
  width?: number
  height?: number
  _loopLength?: number
  _loopIndex?: number
  isInLoop?: boolean
  loop_id?: string
  error_strategy?: ErrorHandleTypeEnum
  retry_config?: WorkflowRetryConfig
  default_value?: DefaultValueForm[]
@@ -102,8 +93,6 @@
  _waitingRun?: boolean
  isInIteration?: boolean
  iteration_id?: string
  isInLoop?: boolean
  loop_id?: string
  sourceType: BlockEnum
  targetType: BlockEnum
}
@@ -178,7 +167,6 @@
  iterator = 'iterator', // iteration input
  singleFile = 'file',
  multiFiles = 'file-list',
  loop = 'loop', // loop input
}
export type InputVar = {
@@ -258,23 +246,16 @@
  any = 'any',
}
export enum ValueType {
  variable = 'variable',
  constant = 'constant',
}
export type Var = {
  variable: string
  type: VarType
  children?: Var[] | StructuredOutput // if type is obj, has the children struct
  children?: Var[] // if type is obj, has the children struct
  isParagraph?: boolean
  isSelect?: boolean
  options?: string[]
  required?: boolean
  des?: string
  isException?: boolean
  isLoopVariable?: boolean
  nodeId?: string
}
export type NodeOutPutVar = {
@@ -282,7 +263,6 @@
  title: string
  vars: Var[]
  isStartNode?: boolean
  isLoop?: boolean
}
export type Block = {
@@ -349,7 +329,6 @@
  transfer_method: TransferMethod[]
  url?: string
  upload_file_id?: string
  related_id?: string
}
export type WorkflowRunningData = {
@@ -421,15 +400,4 @@
export type VisionSetting = {
  variable_selector: ValueSelector
  detail: Resolution
}
export enum WorkflowVersionFilterOptions {
  all = 'all',
  onlyYours = 'onlyYours',
}
export enum VersionHistoryContextMenuOptions {
  restore = 'restore',
  edit = 'edit',
  delete = 'delete',
}