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 353
353
flex : 2% ;
354
354
}
355
355
356
- .log-content {
356
+ .log-body {
357
357
flex : 96%
358
358
}
359
359
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ export const endpoints = {
42
42
conversationDeletionUrl : `${ host } /conversation/{conversationId}` ,
43
43
conversationDetailUrl : `${ host } /conversation/{conversationId}` ,
44
44
conversationAttachmentUrl : `${ host } /conversation/{conversationId}/files/{messageId}` ,
45
+ conversationUserUrl : `${ host } /conversation/{conversationId}/user` ,
45
46
dialogsUrl : `${ host } /conversation/{conversationId}/dialogs` ,
46
47
conversationMessageDeletionUrl : `${ host } /conversation/{conversationId}/message/{messageId}` ,
47
48
Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ export async function getConversation(id) {
26
26
return response . data ;
27
27
}
28
28
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
+
29
40
/**
30
41
* Get conversation list
31
42
* @param {import('$types').ConversationFilter } filter
Original file line number Diff line number Diff line change 15
15
sendMessageToHub ,
16
16
GetDialogs ,
17
17
deleteConversationMessage ,
18
- getConversationFiles
18
+ getConversationFiles ,
19
+ getConversationUser
19
20
} from ' $lib/services/conversation-service.js' ;
20
21
import ' overlayscrollbars/overlayscrollbars.css' ;
21
22
import { OverlayScrollbars } from ' overlayscrollbars' ;
107
108
/** @type {import('$types').UserStateDetailModel[]} */
108
109
let userAddStates = [];
109
110
111
+ /** @type {import('$types').UserModel} */
112
+ let conversationUser;
113
+
110
114
/** @type {boolean} */
111
115
let isLoadContentLog = false ;
112
116
let isLoadStateLog = false ;
137
141
onMount (async () => {
138
142
autoScrollLog = true ;
139
143
dialogs = await GetDialogs (params .conversationId );
144
+ conversationUser = await getConversationUser (params .conversationId );
140
145
initUserSentMessages (dialogs);
141
146
initChatView ();
142
147
875
880
< div class = " col-md-4 col-7 head-left" >
876
881
< div class = " m-1" > {agent? .name }< / div>
877
882
< 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 || ' ' }
879
884
< / div>
880
885
< / div>
881
886
Original file line number Diff line number Diff line change 121
121
</div >
122
122
</div >
123
123
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 }>
125
125
<ul >
126
126
{#each contentLogs as log }
127
127
<ContentLogElement data ={log } />
128
128
{/each }
129
129
</ul >
130
130
</div >
131
131
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 }>
133
133
<ul >
134
134
{#each agentQueueLogs as log }
135
135
<AgentQueueLogElement data ={log } />
Original file line number Diff line number Diff line change 118
118
</button >
119
119
</div >
120
120
</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 }>
122
122
<ul >
123
123
{#each convStateLogs as log }
124
124
<ConversationStateLogElement data ={log } />
125
125
{/each }
126
126
</ul >
127
127
</div >
128
128
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 }>
130
130
<ul >
131
131
{#each msgStateLogs as log }
132
132
<MessageStateLogElement data ={log } />
You can’t perform that action at this time.
0 commit comments