feat: 统一聊天 Markdown 渲染
- 新增 ChatTimeMarkdown 并在管理端、用户端聊天入口复用 - 收敛聊天页面重复 Markdown 样式,保留工具和思考块独立渲染
This commit is contained in:
@@ -509,33 +509,6 @@ async function handleCopyMessage(item: ChatTimeTimelineItem) {
|
||||
|
||||
.chat-history-detail__markdown {
|
||||
min-width: 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.72;
|
||||
}
|
||||
|
||||
.chat-history-detail__markdown :deep(.markdown-body) {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.chat-history-detail__markdown :deep(.markdown-body > :first-child) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.chat-history-detail__markdown :deep(.markdown-body > :last-child) {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.chat-history-detail__markdown :deep(.markdown-body p) {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.chat-history-detail__markdown :deep(pre) {
|
||||
max-width: 100%;
|
||||
margin-top: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.chat-history-detail__tool-panel :deep(.el-collapse-item__wrap) {
|
||||
|
||||
@@ -5,9 +5,8 @@ import type {
|
||||
} from '@easyflow/types';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
import { XMarkdown as ElXMarkdown } from 'vue-element-plus-x';
|
||||
|
||||
import { ChatThinkingBlock } from '@easyflow/common-ui';
|
||||
import { ChatThinkingBlock, ChatTimeMarkdown } from '@easyflow/common-ui';
|
||||
import { IconifyIcon } from '@easyflow/icons';
|
||||
|
||||
import { CircleCheck } from '@element-plus/icons-vue';
|
||||
@@ -75,7 +74,7 @@ function toggleToolExpanded() {
|
||||
:status="segment.status"
|
||||
class="chat-thinking-block-item"
|
||||
/>
|
||||
<ElXMarkdown v-else :markdown="segment.content" />
|
||||
<ChatTimeMarkdown v-else :content="segment.content" />
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -125,7 +124,7 @@ function toggleToolExpanded() {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<ElXMarkdown v-else :markdown="item.content" />
|
||||
<ChatTimeMarkdown v-else :content="item.content" />
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user