diff --git a/ui/src/api/log.ts b/ui/src/api/log.ts index 67b88ab8f..de4716a3f 100644 --- a/ui/src/api/log.ts +++ b/ui/src/api/log.ts @@ -186,6 +186,18 @@ const getChatLogClient: ( ) } +/** + * 客户端删除日志 + * @param 参数 application_id, chat_id, + */ +const delChatClientLog: ( + application_id: string, + chat_id: string, + loading?: Ref +) => Promise> = (application_id, chat_id, loading) => { + return del(`${prefix}/${application_id}/chat/client/${chat_id}`, undefined, {}, loading) +} + export default { getChatLog, delChatLog, @@ -195,5 +207,6 @@ export default { getRecordDetail, delMarkRecord, exportChatLog, - getChatLogClient + getChatLogClient, + delChatClientLog } diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index c4522978e..c66739cb2 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -96,7 +96,6 @@ plain size="small" @click="openParagraph(item)" - :disabled="!item.paragraph_list || item.paragraph_list?.length === 0" >引用分段:{{ item.paragraph_list?.length || 0 }} diff --git a/ui/src/stores/modules/log.ts b/ui/src/stores/modules/log.ts index cc08ad303..d7a8d6498 100644 --- a/ui/src/stores/modules/log.ts +++ b/ui/src/stores/modules/log.ts @@ -48,6 +48,18 @@ const useLogStore = defineStore({ reject(error) }) }) + }, + async asyncDelChatClientLog(id: string, chatId: string, loading?: Ref) { + return new Promise((resolve, reject) => { + logApi + .delChatClientLog(id, chatId, loading) + .then((data) => { + resolve(data) + }) + .catch((error) => { + reject(error) + }) + }) } } }) diff --git a/ui/src/views/chat/embed/index.vue b/ui/src/views/chat/embed/index.vue index b2903af23..22b97286b 100644 --- a/ui/src/views/chat/embed/index.vue +++ b/ui/src/views/chat/embed/index.vue @@ -43,9 +43,16 @@ @click="clickListHandle" >