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 99 class =" content"
1010 @mouseup =" openControl"
1111 :style =" {
12- 'padding-right': showAvatar ? 'var(--padding-left)' : '0'
12+ 'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
1313 }"
1414 >
1515 <el-card shadow =" always" class =" mb-8 border-r-8" style =" --el-card-padding : 6px 16px " >
5252 class =" content"
5353 :style =" {
5454 'padding-left': showAvatar ? 'var(--padding-left)' : '0',
55- 'padding-right': showAvatar ? 'var(--padding-left)' : '0'
55+ 'padding-right': showUserAvatar ? 'var(--padding-left)' : '0'
5656 }"
5757 >
5858 <OperationButton
@@ -92,7 +92,9 @@ const emit = defineEmits(['update:chatRecord'])
9292const showAvatar = computed (() => {
9393 return user .isEnterprise () ? props .application .show_avatar : true
9494})
95-
95+ const showUserAvatar = computed (() => {
96+ return user .isEnterprise () ? props .application .show_user_avatar : true
97+ })
9698const chatMessage = (question : string , type : ' old' | ' new' , other_params_data ? : any ) => {
9799 if (type === ' old' ) {
98100 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()
9393const showAvatar = computed (() => {
9494 return user .isEnterprise () ? props .application .show_user_avatar : true
9595})
96+
9697const document_list = computed (() => {
9798 if (props .chatRecord ?.upload_meta ) {
9899 return props .chatRecord .upload_meta ?.document_list || []
Original file line number Diff line number Diff line change 3030 :available =" applicationAvailable"
3131 :appId =" applicationDetail?.id"
3232 :record =" recordList"
33+ :chatId =" currentChatId"
34+ @refresh =" refresh"
3335 >
3436 <template #operateBefore >
3537 <div >
@@ -67,10 +69,15 @@ const applicationDetail = computed({
6769 set : (v ) => {}
6870})
6971const recordList = ref ([])
72+ const currentChatId = ref (' ' )
7073
7174function newChat() {
75+ currentChatId .value = ' new'
7276 recordList .value = []
7377}
78+ function refresh(id : string ) {
79+ currentChatId .value = id
80+ }
7481 </script >
7582<style lang="scss">
7683.chat {
You can’t perform that action at this time.
0 commit comments