|
|
|
@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next'
|
|
|
|
import produce from 'immer'
|
|
|
|
import produce from 'immer'
|
|
|
|
import { ReactSortable } from 'react-sortablejs'
|
|
|
|
import { ReactSortable } from 'react-sortablejs'
|
|
|
|
import { v4 as uuid4 } from 'uuid'
|
|
|
|
import { v4 as uuid4 } from 'uuid'
|
|
|
|
import type { ModelConfig, PromptItem, ValueSelector, Var, Variable } from '../../../types'
|
|
|
|
import type { PromptItem, ValueSelector, Var, Variable } from '../../../types'
|
|
|
|
import { EditionType, PromptRole } from '../../../types'
|
|
|
|
import { EditionType, PromptRole } from '../../../types'
|
|
|
|
import useAvailableVarList from '../../_base/hooks/use-available-var-list'
|
|
|
|
import useAvailableVarList from '../../_base/hooks/use-available-var-list'
|
|
|
|
import { useWorkflowStore } from '../../../store'
|
|
|
|
import { useWorkflowStore } from '../../../store'
|
|
|
|
@ -33,7 +33,6 @@ type Props = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
varList?: Variable[]
|
|
|
|
varList?: Variable[]
|
|
|
|
handleAddVariable: (payload: any) => void
|
|
|
|
handleAddVariable: (payload: any) => void
|
|
|
|
modelConfig: ModelConfig
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const ConfigPrompt: FC<Props> = ({
|
|
|
|
const ConfigPrompt: FC<Props> = ({
|
|
|
|
@ -48,7 +47,6 @@ const ConfigPrompt: FC<Props> = ({
|
|
|
|
hasSetBlockStatus,
|
|
|
|
hasSetBlockStatus,
|
|
|
|
varList = [],
|
|
|
|
varList = [],
|
|
|
|
handleAddVariable,
|
|
|
|
handleAddVariable,
|
|
|
|
modelConfig,
|
|
|
|
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const workflowStore = useWorkflowStore()
|
|
|
|
const workflowStore = useWorkflowStore()
|
|
|
|
@ -201,7 +199,6 @@ const ConfigPrompt: FC<Props> = ({
|
|
|
|
availableNodes={availableNodesWithParent}
|
|
|
|
availableNodes={availableNodesWithParent}
|
|
|
|
varList={varList}
|
|
|
|
varList={varList}
|
|
|
|
handleAddVariable={handleAddVariable}
|
|
|
|
handleAddVariable={handleAddVariable}
|
|
|
|
modelConfig={modelConfig}
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
@ -237,7 +234,6 @@ const ConfigPrompt: FC<Props> = ({
|
|
|
|
onEditionTypeChange={handleCompletionEditionTypeChange}
|
|
|
|
onEditionTypeChange={handleCompletionEditionTypeChange}
|
|
|
|
handleAddVariable={handleAddVariable}
|
|
|
|
handleAddVariable={handleAddVariable}
|
|
|
|
onGenerated={handleGenerated}
|
|
|
|
onGenerated={handleGenerated}
|
|
|
|
modelConfig={modelConfig}
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
|