From c9acd66eef91806a0b4c374b3066c3c90192baa4 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 4 Aug 2026 11:18:33 +0800 Subject: [PATCH] fix: enhance copy functionality in LogOperationButton for improved text handling --- .../operation-button/LogOperationButton.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/src/components/ai-chat/component/operation-button/LogOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/LogOperationButton.vue index 5d20c5b3a97..a0c2fced5d5 100644 --- a/ui/src/components/ai-chat/component/operation-button/LogOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/LogOperationButton.vue @@ -27,7 +27,7 @@ - + @@ -154,6 +154,17 @@ function editMark(data: any) { const audioPlayerStatus = ref(false) +const copy = (data: any) => { + try { + const text = data.answer_text_list + .map((item: Array) => item.map((i) => i.content).join('\n')) + .join('\n\n') + copyClick(removeFormRander(text)) + } catch (e: any) { + copyClick(removeFormRander(data?.answer_text.trim())) + } +} + function markdownToPlainText(md: string) { return ( md