mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: History record error in dialogue basic mode (#2844)
This commit is contained in:
parent
0213aff12a
commit
e5738f3b31
|
|
@ -9,7 +9,7 @@
|
|||
class="content"
|
||||
@mouseup="openControl"
|
||||
:style="{
|
||||
'padding-right': showAvatar ? 'var(--padding-left)' : '0'
|
||||
'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
|
||||
}"
|
||||
>
|
||||
<el-card shadow="always" class="mb-8 border-r-8" style="--el-card-padding: 6px 16px">
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
class="content"
|
||||
:style="{
|
||||
'padding-left': showAvatar ? 'var(--padding-left)' : '0',
|
||||
'padding-right': showAvatar ? 'var(--padding-left)' : '0'
|
||||
'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
|
||||
}"
|
||||
>
|
||||
<OperationButton
|
||||
|
|
@ -92,7 +92,9 @@ const emit = defineEmits(['update:chatRecord'])
|
|||
const showAvatar = computed(() => {
|
||||
return user.isEnterprise() ? props.application.show_avatar : true
|
||||
})
|
||||
|
||||
const showUserAvatar = computed(() => {
|
||||
return user.isEnterprise() ? props.application.show_user_avatar : true
|
||||
})
|
||||
const chatMessage = (question: string, type: 'old' | 'new', other_params_data?: any) => {
|
||||
if (type === 'old') {
|
||||
add_answer_text_list(props.chatRecord.answer_text_list)
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ const { user } = useStore()
|
|||
const showAvatar = computed(() => {
|
||||
return user.isEnterprise() ? props.application.show_user_avatar : true
|
||||
})
|
||||
|
||||
const document_list = computed(() => {
|
||||
if (props.chatRecord?.upload_meta) {
|
||||
return props.chatRecord.upload_meta?.document_list || []
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@
|
|||
:available="applicationAvailable"
|
||||
:appId="applicationDetail?.id"
|
||||
:record="recordList"
|
||||
:chatId="currentChatId"
|
||||
@refresh="refresh"
|
||||
>
|
||||
<template #operateBefore>
|
||||
<div>
|
||||
|
|
@ -67,10 +69,15 @@ const applicationDetail = computed({
|
|||
set: (v) => {}
|
||||
})
|
||||
const recordList = ref([])
|
||||
const currentChatId = ref('')
|
||||
|
||||
function newChat() {
|
||||
currentChatId.value = 'new'
|
||||
recordList.value = []
|
||||
}
|
||||
function refresh(id: string) {
|
||||
currentChatId.value = id
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.chat {
|
||||
|
|
|
|||
Loading…
Reference in New Issue