diff --git a/src/lib/common/Markdown.svelte b/src/lib/common/Markdown.svelte index eb107c9b..529ba438 100644 --- a/src/lib/common/Markdown.svelte +++ b/src/lib/common/Markdown.svelte @@ -8,6 +8,9 @@ /** @type {string} */ export let containerClasses = ""; + /** @type {string} */ + export let containerStyles = ""; + /** @type {boolean} */ export let rawText = false; @@ -23,6 +26,6 @@ } -
+
{@html displayText}
\ No newline at end of file diff --git a/src/lib/scss/custom/common/_common.scss b/src/lib/scss/custom/common/_common.scss index 1a58aac4..d86ed5f4 100644 --- a/src/lib/scss/custom/common/_common.scss +++ b/src/lib/scss/custom/common/_common.scss @@ -216,7 +216,6 @@ button:focus { th, td { padding: 3px 5px !important; - border: 1px solid white; } } @@ -225,11 +224,31 @@ button:focus { margin-bottom: 0 !important; } + ul { + list-style-position: inside !important; + } +} + +.markdown-lite { + table { + th, td { + border: 1px solid white; + } + } + a { color: white; } +} - ul { - list-style-position: inside !important; +.markdown-dark { + table { + th, td { + border: 1px solid $primary; + } + } + + a { + color: $primary; } } \ No newline at end of file diff --git a/src/lib/scss/custom/pages/_chat.scss b/src/lib/scss/custom/pages/_chat.scss index d9d51a39..21e4755d 100644 --- a/src/lib/scss/custom/pages/_chat.scss +++ b/src/lib/scss/custom/pages/_chat.scss @@ -224,6 +224,10 @@ display: flex; flex-direction: column; width: 80%; + + .bot-msg { + background-color: var(--#{$prefix}light) !important; + } } .ctext-wrap { diff --git a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte index 8ca3a5a7..7ee60259 100644 --- a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte +++ b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte @@ -1060,7 +1060,7 @@ /** @param {string} messageId */ function highlightChatMessage(messageId) { const targets = document.querySelectorAll('.user-msg'); - const style = ['bg-danger', 'text-white']; + const style = ['bg-danger']; targets.forEach(elm => { if (elm.id === `user-msg-${messageId}`) { elm.classList.add(...style); @@ -1590,11 +1590,12 @@ on:keydown={() => {}} on:click={() => directToLog(message.message_id)} > -
-
{@html replaceNewLine(message.text)}
+
{@html replaceNewLine(message.text)}

@@ -1633,7 +1634,7 @@ {/if}

- + {#if message?.message_id === lastBotMsg?.message_id && message?.uuid === lastBotMsg?.uuid}
{#if PUBLIC_LIVECHAT_SPEAKER_ENABLED === 'true'} diff --git a/src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte b/src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte index 33e5c475..f51fb338 100644 --- a/src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte +++ b/src/routes/chat/[agentId]/[conversationId]/rich-content/rc-message.svelte @@ -3,10 +3,22 @@ /** @type {any} */ export let message; + + /** @type {string} */ + export let containerClasses = ''; + + /** @type {string} */ + export let containerStyles = ''; + + /** @type {string} */ + export let markdownClasses = ''; -
+
- +
\ No newline at end of file