File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
components/ai-chat/component Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 9
9
class =" content"
10
10
@mouseup =" openControl"
11
11
:style =" {
12
- 'padding-right': showAvatar ? 'var(--padding-left)' : '0'
12
+ 'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
13
13
}"
14
14
>
15
15
<el-card shadow =" always" class =" mb-8 border-r-8" style =" --el-card-padding : 6px 16px " >
52
52
class =" content"
53
53
:style =" {
54
54
'padding-left': showAvatar ? 'var(--padding-left)' : '0',
55
- 'padding-right': showAvatar ? 'var(--padding-left)' : '0'
55
+ 'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
56
56
}"
57
57
>
58
58
<OperationButton
@@ -92,7 +92,9 @@ const emit = defineEmits(['update:chatRecord'])
92
92
const showAvatar = computed (() => {
93
93
return user .isEnterprise () ? props .application .show_avatar : true
94
94
})
95
-
95
+ const showUserAvatar = computed (() => {
96
+ return user .isEnterprise () ? props .application .show_user_avatar : true
97
+ })
96
98
const chatMessage = (question : string , type : ' old' | ' new' , other_params_data ? : any ) => {
97
99
if (type === ' old' ) {
98
100
add_answer_text_list (props .chatRecord .answer_text_list )
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ const { user } = useStore()
93
93
const showAvatar = computed (() => {
94
94
return user .isEnterprise () ? props .application .show_user_avatar : true
95
95
})
96
+
96
97
const document_list = computed (() => {
97
98
if (props .chatRecord ?.upload_meta ) {
98
99
return props .chatRecord .upload_meta ?.document_list || []
Original file line number Diff line number Diff line change 30
30
:available =" applicationAvailable"
31
31
:appId =" applicationDetail?.id"
32
32
:record =" recordList"
33
+ :chatId =" currentChatId"
34
+ @refresh =" refresh"
33
35
>
34
36
<template #operateBefore >
35
37
<div >
@@ -67,10 +69,15 @@ const applicationDetail = computed({
67
69
set : (v ) => {}
68
70
})
69
71
const recordList = ref ([])
72
+ const currentChatId = ref (' ' )
70
73
71
74
function newChat() {
75
+ currentChatId .value = ' new'
72
76
recordList .value = []
73
77
}
78
+ function refresh(id : string ) {
79
+ currentChatId .value = id
80
+ }
74
81
</script >
75
82
<style lang="scss">
76
83
.chat {
You can’t perform that action at this time.
0 commit comments