fix: Fix variable insertion to only remove @ trigger on current line

This commit is contained in:
zhsama
2026-01-20 01:32:42 +08:00
parent c44aaf1883
commit d69e7eb12a

View File

@ -500,7 +500,8 @@ const MixedVariableTextInput = ({
if (!onChange)
return
const valueWithoutTrigger = value.replace(/@$/, '')
// compute words after the latest '@' and delete them
const valueWithoutTrigger = value.replace(/@[^@\n]*$/, '')
const newValue = `{{@${agent.id}.context@}}${valueWithoutTrigger}`
if (toolNodeId && paramKey) {