feat: 统一聊天 Markdown 渲染

- 新增 ChatTimeMarkdown 并在管理端、用户端聊天入口复用

- 收敛聊天页面重复 Markdown 样式,保留工具和思考块独立渲染
This commit is contained in:
2026-05-18 09:59:59 +08:00
parent a186066641
commit 0947009ee6
15 changed files with 638 additions and 107 deletions

View File

@@ -1,11 +1,9 @@
<script setup lang="ts">
import type { ChatTimeTimelineItem } from '@easyflow/types';
import { XMarkdown as ElXMarkdown } from 'vue-element-plus-x';
import { computed, ref } from 'vue';
import { ChatThinkingBlock } from '@easyflow/common-ui';
import { ChatThinkingBlock, ChatTimeMarkdown } from '@easyflow/common-ui';
import { IconifyIcon } from '@easyflow/icons';
import { useUserStore } from '@easyflow/stores';
@@ -200,7 +198,7 @@ async function handleCopy(item: ChatTimeTimelineItem) {
:status="segment.status"
class="chat-thinking-block-item"
/>
<ElXMarkdown v-else :markdown="segment.content" />
<ChatTimeMarkdown v-else :content="segment.content" />
</template>
</div>
</template>
@@ -256,7 +254,7 @@ async function handleCopy(item: ChatTimeTimelineItem) {
</div>
</div>
</template>
<ElXMarkdown v-else :markdown="item.content" />
<ChatTimeMarkdown v-else :content="item.content" />
</template>
<template #footer="{ item }">