Merge branch 'main' into feat/trigger

This commit is contained in:
Yeuoly
2025-10-21 11:09:26 +08:00
538 changed files with 29462 additions and 12789 deletions

View File

@ -12,7 +12,7 @@ import { noop } from 'lodash-es'
import { getMarketplaceUrl } from '@/utils/var'
export type ListProps = {
wrapElemRef: React.RefObject<HTMLElement>
wrapElemRef: React.RefObject<HTMLElement | null>
list: Plugin[]
searchText: string
tags: string[]

View File

@ -178,6 +178,7 @@ const ToolPicker: FC<Props> = ({
mcpTools={mcpTools || []}
selectedTools={selectedTools}
canChooseMCPTool={canChooseMCPTool}
onTagsChange={setTags}
/>
</div>
</PortalToFollowElemContent>

View File

@ -39,7 +39,6 @@ const Item: FC<Props> = ({
key={tool.id}
payload={tool}
viewType={ViewType.tree}
isShowLetterIndex={false}
hasSearchText={hasSearchText}
onSelect={onSelect}
canNotSelectMultiple={canNotSelectMultiple}

View File

@ -57,6 +57,7 @@ export type ToolDefaultValue = PluginCommonDefaultValue & {
output_schema?: Record<string, any>
credential_id?: string
meta?: PluginMeta
output_schema?: Record<string, any>
}
export type DataSourceDefaultValue = Omit<PluginCommonDefaultValue, 'provider_id'> & {

View File

@ -8,8 +8,8 @@ export enum ScrollPosition {
}
type Params = {
wrapElemRef: React.RefObject<HTMLElement>
nextToStickyELemRef: React.RefObject<HTMLElement>
wrapElemRef: React.RefObject<HTMLElement | null>
nextToStickyELemRef: React.RefObject<HTMLElement | null>
}
const useStickyScroll = ({
wrapElemRef,

View File

@ -21,7 +21,7 @@ const DatasetsDetailProvider: FC<DatasetsDetailProviderProps> = ({
nodes,
children,
}) => {
const storeRef = useRef<DatasetsDetailStoreApi>()
const storeRef = useRef<DatasetsDetailStoreApi>(undefined)
if (!storeRef.current)
storeRef.current = createDatasetsDetailStore()

View File

@ -2,7 +2,7 @@ import { useContext } from 'react'
import { createStore, useStore } from 'zustand'
import type { DataSet } from '@/models/datasets'
import { DatasetsDetailContext } from './provider'
import produce from 'immer'
import { produce } from 'immer'
type DatasetsDetailStore = {
datasetsDetail: Record<string, DataSet>

View File

@ -1,4 +1,4 @@
import produce from 'immer'
import { produce } from 'immer'
import { useCallback } from 'react'
import { useIsChatMode } from './use-workflow'
import type { ModelConfig, VisionSetting } from '@/app/components/workflow/types'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
export const useEdgesInteractionsWithoutSync = () => {

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type {
EdgeMouseHandler,
OnEdgesChange,

View File

@ -10,7 +10,7 @@ import {
isSystemVar,
toNodeOutputVars,
} from '@/app/components/workflow/nodes/_base/components/variable/utils'
import produce from 'immer'
import { produce } from 'immer'
import type { Node } from '@/app/components/workflow/types'
import { useNodesInteractionsWithoutSync } from '@/app/components/workflow/hooks/use-nodes-interactions-without-sync'
import { useEdgesInteractionsWithoutSync } from '@/app/components/workflow/hooks/use-edges-interactions-without-sync'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import { NodeRunningStatus } from '../types'

View File

@ -1,7 +1,7 @@
import type { MouseEvent } from 'react'
import { useCallback, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import type {
NodeDragHandler,
NodeMouseHandler,

View File

@ -2,7 +2,7 @@ import type { MouseEvent } from 'react'
import {
useCallback,
} from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type {
OnSelectionChangeFunc,
} from 'reactflow'

View File

@ -2,7 +2,7 @@ import {
useCallback,
} from 'react'
import { useReactFlow, useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import { useStore, useWorkflowStore } from '../store'
import {
CUSTOM_NODE,

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { AgentLogResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useWorkflowStore } from '@/app/components/workflow/store'
import { WorkflowRunningStatus } from '@/app/components/workflow/types'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { WorkflowFinishedResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'
import { getFilesInLogs } from '@/app/components/base/file-uploader/utils'

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { NodeFinishedResponse } from '@/types/workflow'
import {
BlockEnum,

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { IterationFinishedResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'
import { DEFAULT_ITER_TIMES } from '@/app/components/workflow/constants'

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { IterationNextResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -3,7 +3,7 @@ import {
useReactFlow,
useStoreApi,
} from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import { useWorkflowStore } from '@/app/components/workflow/store'
import type { IterationStartedResponse } from '@/types/workflow'
import { NodeRunningStatus } from '@/app/components/workflow/types'

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { LoopFinishedResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { LoopNextResponse } from '@/types/workflow'
import { NodeRunningStatus } from '@/app/components/workflow/types'

View File

@ -3,7 +3,7 @@ import {
useReactFlow,
useStoreApi,
} from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import { useWorkflowStore } from '@/app/components/workflow/store'
import type { LoopStartedResponse } from '@/types/workflow'
import { NodeRunningStatus } from '@/app/components/workflow/types'

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type {
NodeFinishedResponse,
} from '@/types/workflow'

View File

@ -3,7 +3,7 @@ import {
useReactFlow,
useStoreApi,
} from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { NodeStartedResponse } from '@/types/workflow'
import { NodeRunningStatus } from '@/app/components/workflow/types'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -1,6 +1,6 @@
import { useCallback } from 'react'
import { useStoreApi } from 'reactflow'
import produce from 'immer'
import { produce } from 'immer'
import type { WorkflowStartedResponse } from '@/types/workflow'
import { WorkflowRunningStatus } from '@/app/components/workflow/types'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { TextChunkResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { TextReplaceResponse } from '@/types/workflow'
import { useWorkflowStore } from '@/app/components/workflow/store'

View File

@ -212,7 +212,7 @@ export const AgentStrategySelector = memo((props: AgentStrategySelectorProps) =>
agent_strategy_name: tool!.tool_name,
agent_strategy_provider_name: tool!.provider_name,
agent_strategy_label: tool!.tool_label,
agent_output_schema: tool!.output_schema,
agent_output_schema: tool!.output_schema || {},
plugin_unique_identifier: tool!.provider_id,
meta: tool!.meta,
})

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback, useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import {
RiDeleteBinLine,
} from '@remixicon/react'

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useEffect, useMemo, useRef } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { InputVar } from '../../../../types'
import FormItem from './form-item'
import cn from '@/utils/classnames'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import VarReferencePicker from './variable/var-reference-picker'
import ResolutionPicker from '@/app/components/workflow/nodes/llm/components/resolution-picker'
import Field from '@/app/components/workflow/nodes/_base/components/field'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback } from 'react'
import useSWR from 'swr'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import type { UploadFileSetting } from '../../../types'
import { SupportUploadFileTypes } from '../../../types'

View File

@ -28,7 +28,6 @@ const getIcon = (type: InputVarType) => {
[InputVarType.jsonObject]: RiBracesLine,
[InputVarType.singleFile]: RiFileList2Line,
[InputVarType.multiFiles]: RiFileCopy2Line,
[InputVarType.checkbox]: RiCheckboxLine,
} as any)[type] || RiTextSnippet
}

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import type { Memory } from '../../../types'
import { MemoryRole } from '../../../types'
import cn from '@/utils/classnames'

View File

@ -85,9 +85,9 @@ export const NodeTargetHandle = memo(({
data._runningStatus === NodeRunningStatus.Exception && 'after:bg-workflow-link-line-failure-handle',
!connected && 'after:opacity-0',
(data.type === BlockEnum.Start
|| data.type === BlockEnum.TriggerWebhook
|| data.type === BlockEnum.TriggerSchedule
|| data.type === BlockEnum.TriggerPlugin) && 'opacity-0',
|| data.type === BlockEnum.TriggerWebhook
|| data.type === BlockEnum.TriggerSchedule
|| data.type === BlockEnum.TriggerPlugin) && 'opacity-0',
handleClassName,
)}
isConnectable={isConnectable}

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import type { OutputVar } from '../../../code/types'
import RemoveButton from '../remove-button'

View File

@ -1,4 +1,4 @@
import produce from 'immer'
import { produce } from 'immer'
import { isArray, uniq } from 'lodash-es'
import type { CodeNodeType } from '../../../code/types'
import type { EndNodeType } from '../../../end/types'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import RemoveButton from '../remove-button'
import VarReferencePicker from './var-reference-picker'
import Input from '@/app/components/base/input'

View File

@ -9,7 +9,7 @@ import {
RiLoader4Line,
RiMoreLine,
} from '@remixicon/react'
import produce from 'immer'
import { produce } from 'immer'
import {
useNodes,
useReactFlow,

View File

@ -26,7 +26,7 @@ export const useVarIcon = (variables: string[], variableCategory?: VarInInspectT
if (isConversationVar(variables) || variableCategory === VarInInspectType.conversation || variableCategory === 'conversation')
return BubbleX
if(isGlobalVar(variables))
if (isGlobalVar(variables))
return GlobalVariable
return Variable02
@ -50,7 +50,7 @@ export const useVarColor = (variables: string[], isExceptionVariable?: boolean,
return 'text-util-colors-orange-orange-600'
return 'text-text-accent'
}, [variables, isExceptionVariable])
}, [variables, isExceptionVariable, variableCategory])
}
export const useVarName = (variables: string[], notShowFullPath?: boolean) => {
@ -60,14 +60,19 @@ export const useVarName = (variables: string[], notShowFullPath?: boolean) => {
if (isRagVariableVar(variables))
variableFullPathName = variables.slice(2).join('.')
const variablesLength = variables.length
const varName = useMemo(() => {
variableFullPathName = variables.slice(1).join('.')
if (isRagVariableVar(variables))
variableFullPathName = variables.slice(2).join('.')
const variablesLength = variables.length
const isSystem = isSystemVar(variables)
const varName = notShowFullPath ? variables[variablesLength - 1] : variableFullPathName
return `${isSystem ? 'sys.' : ''}${varName}`
}, [variables, notShowFullPath])
if(showName)
if (showName)
return showName
return varName
}

View File

@ -1,7 +1,7 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { unionBy } from 'lodash-es'
import produce from 'immer'
import { produce } from 'immer'
import {
useIsChatMode,
useNodeDataUpdate,

View File

@ -1,5 +1,5 @@
import { useCallback, useRef, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useBoolean, useDebounceFn } from 'ahooks'
import type {
CodeNodeType,

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { Variable } from '@/app/components/workflow/types'
type Params<T> = {

View File

@ -53,8 +53,13 @@ import { ToolTypeEnum } from '../../block-selector/types'
import { useTriggerStatusStore } from '../../store/trigger-status'
import { isTriggerNode } from '../../types'
type NodeChildProps = {
id: string
data: NodeProps['data']
}
type BaseNodeProps = {
children: ReactElement
children: ReactElement<Partial<NodeChildProps>>
id: NodeProps['id']
data: NodeProps['data']
}

View File

@ -12,7 +12,7 @@ import { useCheckInstalled, useFetchPluginsInMarketPlaceByIds } from '@/service/
import type { Memory, Var } from '../../types'
import { VarType as VarKindType } from '../../types'
import useAvailableVarList from '../_base/hooks/use-available-var-list'
import produce from 'immer'
import { produce } from 'immer'
import { FormTypeEnum } from '@/app/components/header/account-setting/model-provider-page/declarations'
import { isSupportMCP } from '@/utils/plugin-version-feature'
import { generateAgentToolValue, toolParametersToFormSchemas } from '@/app/components/tools/utils/to-form-schema'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import useVarList from '../_base/hooks/use-var-list'
import type { Var } from '../../types'
import { VarType } from '../../types'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import React, { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { RiDeleteBinLine } from '@remixicon/react'
import OperationSelector from '../operation-selector'
import { AssignerNodeInputType, WriteMode } from '../../types'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { AssignerNodeOperation, AssignerNodeType } from '../../types'
import { AssignerNodeInputType, WriteMode } from '../../types'

View File

@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import { VarType } from '../../types'
import type { ValueSelector, Var } from '../../types'

View File

@ -11,6 +11,11 @@ export type OutputVar = Record<string, {
children: null // support nest in the future,
}>
export type CodeDependency = {
name: string
version?: string
}
export type CodeNodeType = CommonNodeType & {
variables: Variable[]
code_language: CodeLanguage

View File

@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import useVarList from '../_base/hooks/use-var-list'
import useOutputVarList from '../_base/hooks/use-output-var-list'
import { BlockEnum, VarType } from '../../types'

View File

@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import type { ValueSelector, Var } from '../../types'
import { VarType } from '../../types'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import React, { useCallback, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { Authorization as AuthorizationPayloadType } from '../../types'
import { APIType, AuthorizationType } from '../../types'
import RadioGroup from './radio-group'

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { uniqueId } from 'lodash-es'
import type { Body, BodyPayload, KeyValue as KeyValueType } from '../../types'
import { BodyPayloadValueType, BodyType } from '../../types'

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import type { KeyValue } from '../../../types'
import KeyValueItem from './item'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import type { KeyValue } from '../../../types'
import VarReferencePicker from '../../../../_base/components/variable/var-reference-picker'
import InputItem from './input-item'

View File

@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useBoolean } from 'ahooks'
import useVarList from '../_base/hooks/use-var-list'
import { VarType } from '../../types'
@ -16,7 +16,7 @@ import {
const useConfig = (id: string, payload: HttpNodeType) => {
const { nodesReadOnly: readOnly } = useNodesReadOnly()
const defaultConfig = useStore(s => s.nodesDefaultConfigs)[payload.type]
const defaultConfig = useStore(s => s.nodesDefaultConfigs?.[payload.type])
const { inputs, setInputs } = useNodeCrud<HttpNodeType>(id, payload)

View File

@ -5,7 +5,7 @@ import {
} from 'react'
import { useTranslation } from 'react-i18next'
import { RiDeleteBinLine } from '@remixicon/react'
import produce from 'immer'
import { produce } from 'immer'
import type { VarType as NumberVarType } from '../../../tool/types'
import type {
Condition,
@ -209,7 +209,7 @@ const ConditionItem = ({
onRemoveCondition?.(caseId, condition.id)
}, [caseId, condition, conditionId, isSubVariableKey, onRemoveCondition, onRemoveSubVariableCondition])
const { getMatchedSchemaType } = useMatchSchemaType()
const { schemaTypeDefinitions } = useMatchSchemaType()
const handleVarChange = useCallback((valueSelector: ValueSelector, _varItem: Var) => {
const {
conversationVariables,
@ -226,7 +226,7 @@ const ConditionItem = ({
workflowTools,
dataSourceList: dataSourceList ?? [],
},
getMatchedSchemaType,
schemaTypeDefinitions,
})
const newCondition = produce(condition, (draft) => {
@ -241,7 +241,7 @@ const ConditionItem = ({
})
doUpdateCondition(newCondition)
setOpen(false)
}, [condition, doUpdateCondition, availableNodes, isChatMode, setControlPromptEditorRerenderKey])
}, [condition, doUpdateCondition, availableNodes, isChatMode, setControlPromptEditorRerenderKey, schemaTypeDefinitions])
const showBooleanInput = useMemo(() => {
if(condition.varType === VarType.boolean)

View File

@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { v4 as uuid4 } from 'uuid'
import { useUpdateNodeInternals } from 'reactflow'
import type {

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import {
useIsChatMode,
useNodesReadOnly,

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import { useStoreApi } from 'reactflow'
import type {

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import Item from './dataset-item'
import type { DataSet } from '@/models/datasets'

View File

@ -4,7 +4,7 @@ import {
useRef,
useState,
} from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { isEqual } from 'lodash-es'
import { v4 as uuid4 } from 'uuid'
import type { ValueSelector, Var } from '../../types'

View File

@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import type { ValueSelector, Var } from '../../types'
import { VarType } from '../../types'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import { ReactSortable } from 'react-sortablejs'
import { v4 as uuid4 } from 'uuid'
import type { ModelConfig, PromptItem, ValueSelector, Var, Variable } from '../../../types'

View File

@ -1,4 +1,4 @@
import produce from 'immer'
import { produce } from 'immer'
import type { VisualEditorProps } from '.'
import { useMittContext } from './context'
import { useVisualEditorStore } from './store'

View File

@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { EditionType, VarType } from '../../types'
import type { Memory, PromptItem, ValueSelector, Var, Variable } from '../../types'
import { useStore } from '../../store'

View File

@ -5,7 +5,7 @@ import {
} from 'react'
import { useTranslation } from 'react-i18next'
import { RiDeleteBinLine } from '@remixicon/react'
import produce from 'immer'
import { produce } from 'immer'
import type { VarType as NumberVarType } from '../../../tool/types'
import type {
Condition,

View File

@ -2,7 +2,7 @@ import {
useCallback,
useRef,
} from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { v4 as uuid4 } from 'uuid'
import {
useIsChatMode,

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import type {
BlockEnum,

View File

@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { Memory, MoreInfo, ValueSelector, Var } from '../../types'
import { ChangeType, VarType } from '../../types'
import { useStore } from '../../store'

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import { useEdgesInteractions } from '../../../hooks'
import AddButton from '../../_base/components/add-button'

View File

@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { BlockEnum, VarType } from '../../types'
import type { Memory, ValueSelector, Var } from '../../types'
import {

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useMemo } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import VarItem from './var-item'
import { ChangeType, type InputVar, type MoreInfo } from '@/app/components/workflow/types'

View File

@ -1,5 +1,5 @@
import { useCallback, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useBoolean } from 'ahooks'
import type { StartNodeType } from './types'
import { ChangeType } from '@/app/components/workflow/types'

View File

@ -1,5 +1,5 @@
import { useCallback, useEffect, useRef } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import useVarList from '../_base/hooks/use-var-list'
import type { Var, Variable } from '../../types'
import { VarType } from '../../types'

View File

@ -1,7 +1,7 @@
'use client'
import type { FC } from 'react'
import React, { useCallback, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useTranslation } from 'react-i18next'
import type { ToolVarInputs } from '../types'
import { VarType as VarKindType } from '../types'

View File

@ -1,6 +1,6 @@
import { useCallback, useEffect, useMemo, useState } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import { useBoolean } from 'ahooks'
import { useStore, useWorkflowStore } from '../../store'
import type { ToolNodeType, ToolVarInputs } from './types'

View File

@ -5,7 +5,7 @@ import useNodeCrud from '../_base/hooks/use-node-crud'
import { type ToolNodeType, VarType } from './types'
import type { ValueSelector } from '@/app/components/workflow/types'
import type { Props as FormProps } from '@/app/components/workflow/nodes/_base/components/before-run-form/form'
import produce from 'immer'
import { produce } from 'immer'
import type { NodeTracing } from '@/types/workflow'
import { useTranslation } from 'react-i18next'
import formatToTracingNodeList from '@/app/components/workflow/run/utils/format-log'

View File

@ -2,7 +2,7 @@
import React, { useCallback } from 'react'
import type { ChangeEvent, FC } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import { useBoolean } from 'ahooks'
import {
RiDeleteBinLine,

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import { useTranslation } from 'react-i18next'
import React, { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import RemoveButton from '../../../_base/components/remove-button'
import ListNoDataPlaceholder from '../../../_base/components/list-no-data-placeholder'
import VarReferencePicker from '@/app/components/workflow/nodes/_base/components/variable/var-reference-picker'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import type { VariableAssignerNodeType } from '../../types'
import type { ValueSelector } from '@/app/components/workflow/types'

View File

@ -4,7 +4,7 @@ import {
useStoreApi,
} from 'reactflow'
import { uniqBy } from 'lodash-es'
import produce from 'immer'
import { produce } from 'immer'
import {
useIsChatMode,
useNodeDataUpdate,

View File

@ -1,5 +1,5 @@
import { useCallback, useRef, useState } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useBoolean, useDebounceFn } from 'ahooks'
import { v4 as uuid4 } from 'uuid'
import type { ValueSelector, Var } from '../../types'

View File

@ -3,7 +3,7 @@ import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { RiAddLine } from '@remixicon/react'
import produce from 'immer'
import { produce } from 'immer'
import RemoveButton from '@/app/components/workflow/nodes/_base/components/remove-button'
import Button from '@/app/components/base/button'
import BoolValue from './bool-value'

View File

@ -3,7 +3,7 @@ import type { FC } from 'react'
import React, { useCallback } from 'react'
import { useTranslation } from 'react-i18next'
import { RiAddLine } from '@remixicon/react'
import produce from 'immer'
import { produce } from 'immer'
import RemoveButton from '@/app/components/workflow/nodes/_base/components/remove-button'
import Button from '@/app/components/base/button'
import Input from '@/app/components/base/input'

View File

@ -2,7 +2,7 @@
import type { FC } from 'react'
import React, { useCallback, useState } from 'react'
import { useTranslation } from 'react-i18next'
import produce from 'immer'
import { produce } from 'immer'
import { useContext } from 'use-context-selector'
import { ToastContext } from '@/app/components/base/toast'
import VariableTypeSelector from '@/app/components/workflow/panel/chat-variable-panel/components/variable-type-select'

View File

@ -17,7 +17,7 @@ import {
RiAlignTop,
} from '@remixicon/react'
import { useNodesReadOnly, useNodesSyncDraft } from './hooks'
import produce from 'immer'
import { produce } from 'immer'
import { WorkflowHistoryEvent, useWorkflowHistory } from './hooks/use-workflow-history'
import { useStore } from './store'
import { useSelectionInteractions } from './hooks/use-selection-interactions'

View File

@ -1,5 +1,5 @@
import type { StateCreator } from 'zustand'
import produce from 'immer'
import { produce } from 'immer'
import type { NodeWithVar, VarInInspect } from '@/types/workflow'
import type { ValueSelector } from '../../../types'

View File

@ -31,7 +31,7 @@ import { useNodesInteractions, useToolIcon } from '../hooks'
import { CodeLanguage } from '../nodes/code/types'
import useNodeCrud from '../nodes/_base/hooks/use-node-crud'
import type { GenRes } from '@/service/debug'
import produce from 'immer'
import { produce } from 'immer'
import { PROMPT_EDITOR_UPDATE_VALUE_BY_EVENT_EMITTER } from '../../base/prompt-editor/plugins/update-block'
import { useEventEmitterContextContext } from '@/context/event-emitter'
import { VariableIconWithColor } from '@/app/components/workflow/nodes/_base/components/variable/variable-label'

View File

@ -1,5 +1,5 @@
import { useCallback } from 'react'
import produce from 'immer'
import { produce } from 'immer'
import { useStoreApi } from 'reactflow'
import type {
Node,