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 99a8a69c5..b78d9caf4 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 afeea39aa..4035dbbff 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -1,56 +1,76 @@ diff --git a/ui/src/components/icons/index.ts b/ui/src/components/icons/index.ts index 88fa64eda..5c7e7ca1f 100644 --- a/ui/src/components/icons/index.ts +++ b/ui/src/components/icons/index.ts @@ -1394,5 +1394,26 @@ export const iconMap: any = { ) ]) } + }, + 'app-user-input': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 1024 1024', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg' + }, + [ + h('path', { + d: 'M85.333333 234.666667a149.333333 149.333333 0 0 1 292.48-42.666667H917.333333a21.333333 21.333333 0 0 1 21.333334 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333334 21.333333H377.813333A149.418667 149.418667 0 0 1 85.333333 234.666667z m21.333334 320a21.333333 21.333333 0 0 1-21.333334-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333334-21.333334h262.186666a149.418667 149.418667 0 0 1 286.293334 0H917.333333a21.333333 21.333333 0 0 1 21.333334 21.333334v42.666666a21.333333 21.333333 0 0 1-21.333334 21.333334h-262.186666a149.418667 149.418667 0 0 1-286.293334 0H106.666667z m405.333333 21.333333a64 64 0 1 0 0-128 64 64 0 0 0 0 128z m-405.333333 256A21.333333 21.333333 0 0 1 85.333333 810.666667v-42.666667a21.333333 21.333333 0 0 1 21.333334-21.333333h539.52a149.418667 149.418667 0 0 1 292.48 42.666666 149.333333 149.333333 0 0 1-292.48 42.666667H106.666667z m682.666666-106.666667a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM234.666667 298.666667a64 64 0 1 0 0-128 64 64 0 0 0 0 128z', + fill: 'currentColor' + }) + ] + ) + ]) + } } } diff --git a/ui/src/locales/lang/en-US/ai-chat.ts b/ui/src/locales/lang/en-US/ai-chat.ts index ac6cc886d..3b2204cc0 100644 --- a/ui/src/locales/lang/en-US/ai-chat.ts +++ b/ui/src/locales/lang/en-US/ai-chat.ts @@ -23,7 +23,8 @@ export default { oppose: 'Dislike', cancelOppose: 'Undo Dislike', continue: 'Continue', - stopChat: 'Stop Response' + stopChat: 'Stop Response', + startChat: 'Start Response', }, tip: { error500Message: 'Sorry, the service is currently under maintenance. Please try again later!', diff --git a/ui/src/locales/lang/zh-CN/ai-chat.ts b/ui/src/locales/lang/zh-CN/ai-chat.ts index fdc4a55f7..913ebb345 100644 --- a/ui/src/locales/lang/zh-CN/ai-chat.ts +++ b/ui/src/locales/lang/zh-CN/ai-chat.ts @@ -23,7 +23,8 @@ export default { oppose: '反对', cancelOppose: '取消反对', continue: '继续', - stopChat: '停止回答' + stopChat: '停止回答', + startChat: '开始回答', }, tip: { error500Message: '抱歉,当前正在维护,无法提供服务,请稍后再试!', diff --git a/ui/src/locales/lang/zh-Hant/ai-chat.ts b/ui/src/locales/lang/zh-Hant/ai-chat.ts index 2972bfe4f..660fb0d0d 100644 --- a/ui/src/locales/lang/zh-Hant/ai-chat.ts +++ b/ui/src/locales/lang/zh-Hant/ai-chat.ts @@ -23,7 +23,8 @@ export default { oppose: '反對', cancelOppose: '取消反對', continue: '繼續', - stopChat: '停止回答' + stopChat: '停止回答', + startChat: '開始回答', }, tip: { error500Message: '抱歉,當前正在維護,無法提供服務,請稍後再試!', diff --git a/ui/src/views/chat/pc/index.vue b/ui/src/views/chat/pc/index.vue index ba65332bf..30fd2fb6b 100644 --- a/ui/src/views/chat/pc/index.vue +++ b/ui/src/views/chat/pc/index.vue @@ -156,8 +156,8 @@ + -