Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Fix new variables in the conversation opener would override prompt_variables (#13191)

HQideae8b3b7e578cc
diff --git a/web/app/components/app/configuration/index.tsx b/web/app/components/app/configuration/index.tsx
index b4289a105af..3a5ee386bbe 100644
--- a/web/app/components/app/configuration/index.tsx
+++ b/web/app/components/app/configuration/index.tsx
@@ -491,7 +491,7 @@ const Configuration: FC = () => {
}, [formattingChangedDispatcher, setShowAppConfigureFeaturesModal])
const handleAddPromptVariable = useCallback((variable: PromptVariable[]) => {
const newModelConfig = produce(modelConfig, (draft: ModelConfig) => {
- draft.configs.prompt_variables = variable
+ draft.configs.prompt_variables = [...draft.configs.prompt_variables, ...variable]
})
setModelConfig(newModelConfig)
}, [modelConfig])