File tree Expand file tree Collapse file tree 6 files changed +24
-7
lines changed
routes/chat/[agentId]/[conversationId] Expand file tree Collapse file tree 6 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 353353 flex : 2% ;
354354 }
355355
356- .log-content {
356+ .log-body {
357357 flex : 96%
358358 }
359359
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export const endpoints = {
4242 conversationDeletionUrl : `${ host } /conversation/{conversationId}` ,
4343 conversationDetailUrl : `${ host } /conversation/{conversationId}` ,
4444 conversationAttachmentUrl : `${ host } /conversation/{conversationId}/files/{messageId}` ,
45+ conversationUserUrl : `${ host } /conversation/{conversationId}/user` ,
4546 dialogsUrl : `${ host } /conversation/{conversationId}/dialogs` ,
4647 conversationMessageDeletionUrl : `${ host } /conversation/{conversationId}/message/{messageId}` ,
4748
Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ export async function getConversation(id) {
2626 return response . data ;
2727}
2828
29+ /**
30+ * Get conversation user
31+ * @param {string } id
32+ * @returns {Promise<import('$types').UserModel> }
33+ */
34+ export async function getConversationUser ( id ) {
35+ let url = replaceUrl ( endpoints . conversationUserUrl , { conversationId : id } ) ;
36+ const response = await axios . get ( url ) ;
37+ return response . data ;
38+ }
39+
2940/**
3041 * Get conversation list
3142 * @param {import('$types').ConversationFilter } filter
Original file line number Diff line number Diff line change 1515 sendMessageToHub ,
1616 GetDialogs ,
1717 deleteConversationMessage ,
18- getConversationFiles
18+ getConversationFiles ,
19+ getConversationUser
1920 } from ' $lib/services/conversation-service.js' ;
2021 import ' overlayscrollbars/overlayscrollbars.css' ;
2122 import { OverlayScrollbars } from ' overlayscrollbars' ;
107108 /** @type {import('$types').UserStateDetailModel[]} */
108109 let userAddStates = [];
109110
111+ /** @type {import('$types').UserModel} */
112+ let conversationUser;
113+
110114 /** @type {boolean} */
111115 let isLoadContentLog = false ;
112116 let isLoadStateLog = false ;
137141 onMount (async () => {
138142 autoScrollLog = true ;
139143 dialogs = await GetDialogs (params .conversationId );
144+ conversationUser = await getConversationUser (params .conversationId );
140145 initUserSentMessages (dialogs);
141146 initChatView ();
142147
875880 < div class = " col-md-4 col-7 head-left" >
876881 < div class = " m-1" > {agent? .name }< / div>
877882 < div class = " text-muted mb-0" >
878- < i class = " mdi mdi-circle text-success align-middle me-1" / > {currentUser ? . user_name || ' ' }
883+ < i class = " mdi mdi-circle text-success align-middle me-1" / > {conversationUser ? . full_name || ' ' }
879884 < / div>
880885 < / div>
881886
Original file line number Diff line number Diff line change 121121 </div >
122122 </div >
123123
124- <div class ="content-log-scrollbar log-list padding-side log-content " class:hide ={selectedTab !== contentLogTab }>
124+ <div class ="content-log-scrollbar log-list padding-side log-body " class:hide ={selectedTab !== contentLogTab }>
125125 <ul >
126126 {#each contentLogs as log }
127127 <ContentLogElement data ={log } />
128128 {/each }
129129 </ul >
130130 </div >
131131
132- <div class ="queue-change-log-scrollbar log-list log-content " class:hide ={selectedTab !== agentQueueLogTab }>
132+ <div class ="queue-change-log-scrollbar log-list log-body " class:hide ={selectedTab !== agentQueueLogTab }>
133133 <ul >
134134 {#each agentQueueLogs as log }
135135 <AgentQueueLogElement data ={log } />
Original file line number Diff line number Diff line change 118118 </button >
119119 </div >
120120 </div >
121- <div class ="conv-state-log-scrollbar log-list padding-side log-content " class:hide ={selectedTab !== convStateLogTab }>
121+ <div class ="conv-state-log-scrollbar log-list padding-side log-body " class:hide ={selectedTab !== convStateLogTab }>
122122 <ul >
123123 {#each convStateLogs as log }
124124 <ConversationStateLogElement data ={log } />
125125 {/each }
126126 </ul >
127127 </div >
128128
129- <div class ="msg-state-log-scrollbar log-list padding-side log-content " class:hide ={selectedTab !== msgStateLogTab }>
129+ <div class ="msg-state-log-scrollbar log-list padding-side log-body " class:hide ={selectedTab !== msgStateLogTab }>
130130 <ul >
131131 {#each msgStateLogs as log }
132132 <MessageStateLogElement data ={log } />
You can’t perform that action at this time.
0 commit comments