mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
fix: Fix agent context variable insertion to preserve existing text
This commit is contained in:
@ -113,7 +113,8 @@ const MixedVariableTextInput = ({
|
||||
if (!onChange)
|
||||
return
|
||||
|
||||
const newValue = `{{#${agent.id}.context#}}`
|
||||
const valueWithoutTrigger = value.replace(/@$/, '')
|
||||
const newValue = `{{#${agent.id}.context#}}${valueWithoutTrigger}`
|
||||
|
||||
onChange(newValue)
|
||||
setControlPromptEditorRerenderKey(Date.now())
|
||||
|
||||
Reference in New Issue
Block a user