fix: Image understanding of non-existent variable prompts

--bug=1050722 --user=刘瑞斌 【应用编排】前置节点删掉后,调试和发布的时候引用前置节点的变量要有提示 https://www.tapd.cn/57709429/s/1635604
This commit is contained in:
CaptainB 2024-12-23 16:18:33 +08:00
parent 418c87093d
commit 4920e8787b

View File

@ -221,8 +221,12 @@ const providerOptions = ref<Array<Provider>>([])
const AIModeParamSettingDialogRef = ref<InstanceType<typeof AIModeParamSettingDialog>>()
const aiChatNodeFormRef = ref<FormInstance>()
const nodeCascaderRef = ref()
const validate = () => {
return aiChatNodeFormRef.value?.validate().catch((err) => {
return Promise.all([
nodeCascaderRef.value ? nodeCascaderRef.value.validate() : Promise.resolve(''),
aiChatNodeFormRef.value?.validate()
]).catch((err: any) => {
return Promise.reject({ node: props.nodeModel, errMessage: err })
})
}