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 4141 </span >
4242 <span v-if =" type == 'ai-chat' || type == 'log'" >
4343 <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)" >
4545 <AppIcon iconName =" app-copy" ></AppIcon >
4646 </el-button >
4747 </el-tooltip >
@@ -106,7 +106,16 @@ import applicationApi from '@/api/application'
106106import { datetimeFormat } from ' @/utils/time'
107107import { MsgError } from ' @/utils/message'
108108import 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+ }
110119const route = useRoute ()
111120const {
112121 params : { id }
You can’t perform that action at this time.
0 commit comments