File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
ui/src/components/ai-chat/component/operation-button Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 41
41
</span >
42
42
<span v-if =" type == 'ai-chat' || type == 'log'" >
43
43
<el-tooltip effect =" dark" :content =" $t('common.copy')" placement =" top" >
44
- <el-button text @click =" copyClick (data?.answer_text.trim() )" >
44
+ <el-button text @click =" copy (data)" >
45
45
<AppIcon iconName =" app-copy" ></AppIcon >
46
46
</el-button >
47
47
</el-tooltip >
@@ -106,7 +106,16 @@ import applicationApi from '@/api/application'
106
106
import { datetimeFormat } from ' @/utils/time'
107
107
import { MsgError } from ' @/utils/message'
108
108
import bus from ' @/bus'
109
-
109
+ const copy = (data : any ) => {
110
+ try {
111
+ const text = data .answer_text_list
112
+ .map ((item : Array <any >) => item .map ((i ) => i .content ).join (' \n ' ))
113
+ .join (' \n\n ' )
114
+ copyClick (text )
115
+ } catch (e : any ) {
116
+ copyClick (removeFormRander (data ?.answer_text .trim ()))
117
+ }
118
+ }
110
119
const route = useRoute ()
111
120
const {
112
121
params : { id }
You can’t perform that action at this time.
0 commit comments