File tree Expand file tree Collapse file tree 5 files changed +49
-10
lines changed
routes/chat/[agentId]/[conversationId] Expand file tree Collapse file tree 5 files changed +49
-10
lines changed Original file line number Diff line number Diff line change 88 /** @type {string} */
99 export let containerClasses = " " ;
1010
11+ /** @type {string} */
12+ export let containerStyles = " " ;
13+
1114 /** @type {boolean} */
1215 export let rawText = false ;
1316
2326 }
2427< / script>
2528
26- < div class = {` markdown-container ${ containerClasses || ' text-white' } ` }>
29+ < div class = {` markdown-container markdown-lite ${ containerClasses || ' text-white' } ` } style = { ` ${ containerStyles } ` }>
2730 {@html displayText}
2831< / div>
Original file line number Diff line number Diff line change @@ -216,7 +216,6 @@ button:focus {
216216
217217 th , td {
218218 padding : 3px 5px !important ;
219- border : 1px solid white ;
220219 }
221220 }
222221
@@ -225,11 +224,31 @@ button:focus {
225224 margin-bottom : 0 !important ;
226225 }
227226
227+ ul {
228+ list-style-position : inside !important ;
229+ }
230+ }
231+
232+ .markdown-lite {
233+ table {
234+ th , td {
235+ border : 1px solid white ;
236+ }
237+ }
238+
228239 a {
229240 color : white ;
230241 }
242+ }
231243
232- ul {
233- list-style-position : inside !important ;
244+ .markdown-dark {
245+ table {
246+ th , td {
247+ border : 1px solid $primary ;
248+ }
249+ }
250+
251+ a {
252+ color : $primary ;
234253 }
235254}
Original file line number Diff line number Diff line change 224224 display : flex ;
225225 flex-direction : column ;
226226 width : 80% ;
227+
228+ .bot-msg {
229+ background-color : var (--#{$prefix}light ) !important ;
230+ }
227231 }
228232
229233 .ctext-wrap {
Original file line number Diff line number Diff line change 10601060 /** @param {string} messageId */
10611061 function highlightChatMessage(messageId) {
10621062 const targets = document.querySelectorAll('.user-msg');
1063- const style = ['bg-danger', 'text-white' ];
1063+ const style = ['bg-danger'];
10641064 targets.forEach(elm => {
10651065 if (elm.id === ` user- msg- ${messageId}` ) {
10661066 elm.classList.add(...style);
15901590 on:keydown={() => {}}
15911591 on:click={() => directToLog(message.message_id)}
15921592 >
1593- <div class="ctext-wrap user-msg"
1593+ <div
1594+ class="ctext-wrap user-msg bg-primary"
15941595 class:clickable={!isLite && isLoadPersistLog}
15951596 id={` user- msg- ${message .message_id }` }
15961597 >
1597- <div class="text-start fw-bold">{@html replaceNewLine(message.text)}</div>
1598+ <div class="text-start fw-bold text-white ">{@html replaceNewLine(message.text)}</div>
15981599 </div>
15991600 <p class="chat-time mb-0 float-end">
16001601 <i class="bx bx-time-five align-middle me-1" />
16331634 {/if}
16341635 </div>
16351636 <div class="msg-container">
1636- <RcMessage message={message} />
1637+ <RcMessage containerClasses={'bot-msg'} markdownClasses={'markdown-dark text-dark'} message={message} />
16371638 {#if message?.message_id === lastBotMsg?.message_id && message?.uuid === lastBotMsg?.uuid}
16381639 <div style="display: flex; gap: 10px;">
16391640 {#if PUBLIC_LIVECHAT_SPEAKER_ENABLED === 'true'}
Original file line number Diff line number Diff line change 33
44 /** @type {any} */
55 export let message;
6+
7+ /** @type {string} */
8+ export let containerClasses = ' ' ;
9+
10+ /** @type {string} */
11+ export let containerStyles = ' ' ;
12+
13+ /** @type {string} */
14+ export let markdownClasses = ' ' ;
615 </script >
716
8- <div class =" ctext-wrap bg-primary" >
17+ <div
18+ class ={` ctext-wrap bg-primary ${containerClasses } ` }
19+ style ={` ${containerStyles } ` }
20+ >
921 <div class =" flex-shrink-0 align-self-center" >
10- <Markdown text ={message ?.rich_content ?.message ?.text || message ?.text } rawText />
22+ <Markdown containerClasses ={ markdownClasses } text ={message ?.rich_content ?.message ?.text || message ?.text } rawText />
1123 </div >
1224</div >
You can’t perform that action at this time.
0 commit comments