From 9f06c238d3510944c71ea244e9f05b3950e210bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AD=90=E9=BB=98?= <925456043@qq.com> Date: Wed, 22 Jul 2026 20:07:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E4=BD=8E=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=B5=8F=E8=A7=88=E5=99=A8=E6=B6=88=E6=81=AF=E5=A4=8D?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 Chrome 90 增加剪贴板兼容回退 - 统一聊天与智能体试运行的原色对勾反馈 --- .../chat-history/ChatHistoryDetailDrawer.vue | 16 +-- .../ChatMessageActionBar.test.ts | 66 +++++++++++ .../chat-workspace/ChatMessageActionBar.vue | 72 ++++++++++-- .../app/src/components/chat/chat.vue | 10 +- .../app/src/views/ai/agent-chat/index.vue | 13 ++- .../ai/agents/components/AgentTryoutPanel.vue | 13 ++- .../app/src/views/ai/chat/index.vue | 22 +--- .../app/src/views/publicChat/index.vue | 15 +-- .../chat-timeline/ChatMessageToolbar.vue | 72 +++++++++++- .../components/chat-timeline/ChatTimeline.vue | 2 + .../chat-timeline/ChatTimelineItem.vue | 10 ++ .../__tests__/ChatTimelineToolbar.test.ts | 34 +++++- .../src/helpers/__tests__/clipboard.test.ts | 108 ++++++++++++++++++ .../packages/utils/src/helpers/clipboard.ts | 52 +++++++++ .../packages/utils/src/helpers/index.ts | 1 + 15 files changed, 423 insertions(+), 83 deletions(-) create mode 100644 easyflow-ui-admin/app/src/components/chat-workspace/ChatMessageActionBar.test.ts create mode 100644 easyflow-ui-admin/packages/utils/src/helpers/__tests__/clipboard.test.ts create mode 100644 easyflow-ui-admin/packages/utils/src/helpers/clipboard.ts 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 bfc2367a..95a0b0fc 100644 --- a/easyflow-ui-admin/app/src/components/chat-history/ChatHistoryDetailDrawer.vue +++ b/easyflow-ui-admin/app/src/components/chat-history/ChatHistoryDetailDrawer.vue @@ -2,7 +2,7 @@ import type { ChatTimeTimelineItem } from '@easyflow/types'; import { Close } from '@element-plus/icons-vue'; -import { ElButton, ElEmpty, ElIcon, ElMessage, ElScrollbar } from 'element-plus'; +import { ElButton, ElEmpty, ElIcon, ElScrollbar } from 'element-plus'; import ChatTimeMessageContent from '#/components/chat/ChatTimeMessageContent.vue'; import ChatMessageActionBar from '#/components/chat-workspace/ChatMessageActionBar.vue'; @@ -125,18 +125,6 @@ function isFinalAssistantInRound(item: ChatTimeTimelineItem) { function canCopyMessage(item: ChatTimeTimelineItem) { return item.role !== 'tool' && Boolean(String(item.content || '').trim()); } - -async function handleCopyMessage(item: ChatTimeTimelineItem) { - if (!canCopyMessage(item)) { - return; - } - try { - await navigator.clipboard.writeText(String(item.content || '')); - ElMessage.success('已复制'); - } catch { - ElMessage.error('复制失败'); - } -}