diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 99a8a69c58b..b78d9caf494 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -1,7 +1,6 @@ @@ -60,6 +65,7 @@ const props = defineProps<{ type: 'log' | 'ai-chat' | 'debug-ai-chat' api_form_data: any form_data: any + first: boolean }>() // 用于刷新动态表单 const dynamicsFormRefresh = ref(0) @@ -67,7 +73,7 @@ const inputFieldList = ref([]) const apiInputFieldList = ref([]) const inputFieldConfig = ref({ title: t('chat.userInput') }) const showUserInput = ref(true) -const emit = defineEmits(['update:api_form_data', 'update:form_data']) +const emit = defineEmits(['update:api_form_data', 'update:form_data', 'confirm', 'cancel']) const api_form_data_context = computed({ get: () => { @@ -324,6 +330,14 @@ const decodeQuery = (query: string) => { return query } } +const confirmHandle = () => { + if (checkInputParam()) { + emit('confirm') + } +} +const cancelHandle = () => { + emit('cancel') +} defineExpose({ checkInputParam }) onMounted(() => { handleInputFieldList() diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index afeea39aad7..4035dbbff27 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -1,56 +1,76 @@