Skip to content

Commit aaf56e1

Browse files
committed
style(chat): unify intent response UI with teal theme and add markdown support
- Replace plain text with MdComponent for basic markdown rendering (bold, headings) - Restyle intent-response from green to teal color scheme matching project design - Override markdown-body background for transparent container integration
1 parent 37fb58a commit aaf56e1

1 file changed

Lines changed: 19 additions & 9 deletions

File tree

frontend/src/views/chat/index.vue

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@
242242
v-if="message.record?.intent_response"
243243
class="intent-response"
244244
>
245-
{{ message.record.intent_response }}
245+
<MdComponent :message="message.record.intent_response" />
246246
</div>
247247
<ErrorInfo :error="message.record?.error" class="error-container" />
248248
<template #tool>
@@ -468,6 +468,7 @@ import ChatCreator from '@/views/chat/ChatCreator.vue'
468468
import ChatTokenTime from '@/views/chat/ChatTokenTime.vue'
469469
import ErrorInfo from './ErrorInfo.vue'
470470
import ChatToolBar from './ChatToolBar.vue'
471+
import MdComponent from '@/views/chat/component/MdComponent.vue'
471472
import { dsTypeWithImg } from '@/views/ds/js/ds-type'
472473
import { useI18n } from 'vue-i18n'
473474
import { find, forEach } from 'lodash-es'
@@ -1340,15 +1341,24 @@ onMounted(() => {
13401341
.intent-response {
13411342
margin-top: 8px;
13421343
padding: 12px 16px;
1343-
font-weight: 400;
1344-
font-size: 16px;
1345-
line-height: 24px;
1346-
color: rgba(31, 35, 41, 1);
1347-
white-space: pre-wrap;
1348-
word-break: break-word;
1349-
background-color: rgba(230, 247, 230, 0.6);
1344+
background-color: rgba(28, 186, 144, 0.06);
13501345
border-radius: 8px;
1351-
border-left: 3px solid rgba(82, 196, 82, 0.8);
1346+
border-left: 3px solid rgba(28, 186, 144, 0.5);
1347+
1348+
:deep(.markdown-body) {
1349+
background-color: transparent;
1350+
font-weight: 400;
1351+
font-size: 16px;
1352+
line-height: 24px;
1353+
color: rgba(31, 35, 41, 1);
1354+
1355+
p:last-child {
1356+
margin-bottom: 0;
1357+
}
1358+
p:first-child {
1359+
margin-top: 0;
1360+
}
1361+
}
13521362
}
13531363
13541364
.error-container {

0 commit comments

Comments
 (0)