mirror of
https://github.com/langgenius/dify.git
synced 2026-01-13 21:57:48 +08:00
fix: Fix agent context variable insertion to preserve existing text
This commit is contained in:
parent
b25b069917
commit
47790b49d4
@ -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())
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"version": "1.11.2",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.27.0+sha512.72d699da16b1179c14ba9e64dc71c9a40988cbdc65c264cb0e489db7de917f20dcf4d64d8723625f2969ba52d4b7e2a1170682d9ac2a5dcaeaab732b7e16f04a",
|
||||
"packageManager": "pnpm@10.28.0+sha512.05df71d1421f21399e053fde567cea34d446fa02c76571441bfc1c7956e98e363088982d940465fd34480d4d90a0668bc12362f8aa88000a64e83d0b0e47be48",
|
||||
"imports": {
|
||||
"#i18n": {
|
||||
"react-server": "./i18n-config/lib.server.ts",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user