fix(workflow): Implement automatic variable addition from opening statement to start node (#9450)

This commit is contained in:
Kevin9703
2024-10-17 19:01:50 +08:00
committed by GitHub
parent a45f8969a0
commit e7aecb89dd
3 changed files with 38 additions and 3 deletions

View File

@@ -13,16 +13,19 @@ import TextToSpeech from './text-to-speech'
import SpeechToText from './speech-to-text'
import Citation from './citation'
import Moderation from './moderation'
import type { InputVar } from '@/app/components/workflow/types'
export type FeaturePanelProps = {
onChange?: OnFeaturesChange
openingStatementProps: OpeningStatementProps
disabled?: boolean
workflowVariables: InputVar[]
}
const FeaturePanel = ({
onChange,
openingStatementProps,
disabled,
workflowVariables,
}: FeaturePanelProps) => {
const { t } = useTranslation()
const features = useFeatures(s => s.features)
@@ -60,6 +63,7 @@ const FeaturePanel = ({
{...openingStatementProps}
onChange={onChange}
readonly={disabled}
workflowVariables={workflowVariables}
/>
)
}