feat(web): app citations

This commit is contained in:
zhaoying
2026-04-24 15:18:14 +08:00
parent c556995f3a
commit c7c1570d40
2 changed files with 2 additions and 3 deletions

View File

@@ -357,7 +357,7 @@ const Agent = forwardRef<AgentRef, { onFeaturesLoad?: (features: FeaturesConfigF
const { statement = '' } = value?.opening_statement || {}
onFeaturesLoad?.(value)
if (value.opening_statement.enabled) {
if (value?.opening_statement?.enabled) {
const usedVars = [...new Set([...(statement?.matchAll(/\{\{(\w+)\}\}/g) ?? [])].map(m => m[1]))]
const variables = values?.variables
const validNames = new Set(variables.map(v => v.name))