diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index a6cdb838625..1936cd53b79 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -47,7 +47,12 @@ props.modelValue, + (val) => { + if (!val) return + if (_.isEqual(val, formValue.value)) return + formValue.value = _.cloneDeep(val) + }, + { deep: true }, +) + function renderTemplate(template: string, data: any) { return template.replace(/\$\{(\w+)\}/g, (match, key) => { return data[key] !== undefined ? data[key] : match