diff --git a/easyflow-ui-admin/app/src/components/chat-history/ChatHistoryDetailDrawer.vue b/easyflow-ui-admin/app/src/components/chat-history/ChatHistoryDetailDrawer.vue index b9784bc..308e46d 100644 --- a/easyflow-ui-admin/app/src/components/chat-history/ChatHistoryDetailDrawer.vue +++ b/easyflow-ui-admin/app/src/components/chat-history/ChatHistoryDetailDrawer.vue @@ -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) { diff --git a/easyflow-ui-admin/app/src/components/chat/ChatTimeMessageContent.vue b/easyflow-ui-admin/app/src/components/chat/ChatTimeMessageContent.vue index 053d81d..3099799 100644 --- a/easyflow-ui-admin/app/src/components/chat/ChatTimeMessageContent.vue +++ b/easyflow-ui-admin/app/src/components/chat/ChatTimeMessageContent.vue @@ -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" /> - + @@ -125,7 +124,7 @@ function toggleToolExpanded() { - + diff --git a/easyflow-ui-admin/packages/effects/common-ui/src/components/chat-markdown/index.ts b/easyflow-ui-admin/packages/effects/common-ui/src/components/chat-markdown/index.ts new file mode 100644 index 0000000..bc682e4 --- /dev/null +++ b/easyflow-ui-admin/packages/effects/common-ui/src/components/chat-markdown/index.ts @@ -0,0 +1 @@ +export { default as ChatTimeMarkdown } from './ChatTimeMarkdown.vue'; diff --git a/easyflow-ui-admin/packages/effects/common-ui/src/components/index.ts b/easyflow-ui-admin/packages/effects/common-ui/src/components/index.ts index a650c5f..caae19d 100644 --- a/easyflow-ui-admin/packages/effects/common-ui/src/components/index.ts +++ b/easyflow-ui-admin/packages/effects/common-ui/src/components/index.ts @@ -1,5 +1,6 @@ export * from './api-component'; export * from './captcha'; +export * from './chat-markdown'; export * from './chat-thinking'; export * from './col-page'; export * from './count-to'; diff --git a/easyflow-ui-admin/pnpm-lock.yaml b/easyflow-ui-admin/pnpm-lock.yaml index 736ac70..ac2082f 100644 --- a/easyflow-ui-admin/pnpm-lock.yaml +++ b/easyflow-ui-admin/pnpm-lock.yaml @@ -1366,6 +1366,9 @@ importers: vue: specifier: ^3.5.17 version: 3.5.24(typescript@5.9.3) + vue-element-plus-x: + specifier: 'catalog:' + version: 1.3.7(rollup@4.53.2)(vue@3.5.24(typescript@5.9.3)) vue-json-viewer: specifier: 'catalog:' version: 3.0.4(vue@3.5.24(typescript@5.9.3)) diff --git a/easyflow-ui-usercenter/app/src/components/chat/bubbleList.vue b/easyflow-ui-usercenter/app/src/components/chat/bubbleList.vue index 02907a4..1fa6b61 100644 --- a/easyflow-ui-usercenter/app/src/components/chat/bubbleList.vue +++ b/easyflow-ui-usercenter/app/src/components/chat/bubbleList.vue @@ -1,11 +1,9 @@ + + + + diff --git a/easyflow-ui-usercenter/packages/effects/common-ui/src/components/chat-markdown/index.ts b/easyflow-ui-usercenter/packages/effects/common-ui/src/components/chat-markdown/index.ts new file mode 100644 index 0000000..bc682e4 --- /dev/null +++ b/easyflow-ui-usercenter/packages/effects/common-ui/src/components/chat-markdown/index.ts @@ -0,0 +1 @@ +export { default as ChatTimeMarkdown } from './ChatTimeMarkdown.vue'; diff --git a/easyflow-ui-usercenter/packages/effects/common-ui/src/components/index.ts b/easyflow-ui-usercenter/packages/effects/common-ui/src/components/index.ts index a650c5f..caae19d 100644 --- a/easyflow-ui-usercenter/packages/effects/common-ui/src/components/index.ts +++ b/easyflow-ui-usercenter/packages/effects/common-ui/src/components/index.ts @@ -1,5 +1,6 @@ export * from './api-component'; export * from './captcha'; +export * from './chat-markdown'; export * from './chat-thinking'; export * from './col-page'; export * from './count-to'; diff --git a/easyflow-ui-usercenter/pnpm-lock.yaml b/easyflow-ui-usercenter/pnpm-lock.yaml index 8a22af2..9961d9c 100644 --- a/easyflow-ui-usercenter/pnpm-lock.yaml +++ b/easyflow-ui-usercenter/pnpm-lock.yaml @@ -1342,6 +1342,9 @@ importers: vue: specifier: ^3.5.17 version: 3.5.24(typescript@5.9.3) + vue-element-plus-x: + specifier: 'catalog:' + version: 1.3.7(rollup@4.53.2)(vue@3.5.24(typescript@5.9.3)) vue-json-viewer: specifier: 'catalog:' version: 3.0.4(vue@3.5.24(typescript@5.9.3))