Skip to content

Commit 57b3aa1

Browse files
fix: Fix the issue where the display history setting does not take effect(#4201)
1 parent 1f4dd35 commit 57b3aa1

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ui/src/views/chat/component/HistoryPanel.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<div
4141
v-show="!isPcCollapse"
4242
class="flex-between p-8 pb-0 color-secondary mt-8"
43-
v-if="applicationDetail.show_history || user.isCE()"
43+
v-if="showHistory"
4444
>
4545
<span>{{ $t('chat.history') }}</span>
4646
<el-tooltip effect="dark" :content="$t('chat.clearChat')" placement="right">
@@ -53,7 +53,7 @@
5353
<div
5454
v-show="!isPcCollapse"
5555
class="left-height"
56-
v-if="applicationDetail.show_history || user.isCE()"
56+
v-if="showHistory"
5757
>
5858
<el-scrollbar>
5959
<div class="p-16 pt-0">
@@ -114,7 +114,7 @@
114114
<el-sub-menu
115115
v-show="isPcCollapse"
116116
index="2"
117-
v-if="applicationDetail.show_history || user.isCE()"
117+
v-if="showHistory"
118118
>
119119
<template #title>
120120
<AppIcon iconName="app-history-outlined" />
@@ -172,10 +172,11 @@
172172
</div>
173173
</template>
174174
<script setup lang="ts">
175-
import { ref } from 'vue'
175+
import { ref, computed } from 'vue'
176176
import { isAppIcon } from '@/utils/common'
177177
import EditTitleDialog from './EditTitleDialog.vue'
178178
import useStore from '@/stores'
179+
import { c } from 'vite/dist/node/moduleRunnerTransport.d-CXw_Ws6P'
179180
180181
const { user } = useStore()
181182
const props = defineProps<{
@@ -187,6 +188,13 @@ const props = defineProps<{
187188
}>()
188189
const emit = defineEmits(['newChat', 'clickLog', 'deleteLog', 'refreshFieldTitle', 'clearChat'])
189190
191+
const showHistory = computed(() => {
192+
console.log(props.applicationDetail?.show_history)
193+
return props.applicationDetail?.show_history != null || undefined
194+
? props.applicationDetail?.show_history
195+
: true
196+
})
197+
190198
const EditTitleDialogRef = ref()
191199
192200
const mouseId = ref('')

0 commit comments

Comments
 (0)