|  | @@ -9,7 +9,7 @@ import { t } from '@/locales'
 | 
											
												
													
														|  |  import { useBasicLayout } from '@/hooks/useBasicLayout'
 |  |  import { useBasicLayout } from '@/hooks/useBasicLayout'
 | 
											
												
													
														|  |  import { copyToClip } from '@/utils/copy'
 |  |  import { copyToClip } from '@/utils/copy'
 | 
											
												
													
														|  |  import { homeStore } from '@/store'
 |  |  import { homeStore } from '@/store'
 | 
											
												
													
														|  | -import { getSeed, mlog } from '@/api' 
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { getSeed, mlog ,mjImgUrl} from '@/api' 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  interface Props {
 |  |  interface Props {
 | 
											
												
													
														|  |    dateTime?: string
 |  |    dateTime?: string
 | 
											
										
											
												
													
														|  | @@ -61,14 +61,22 @@ const options = computed(() => {
 | 
											
												
													
														|  |        label: asRawText.value ? t('chat.preview') : t('chat.showRawText'),
 |  |        label: asRawText.value ? t('chat.preview') : t('chat.showRawText'),
 | 
											
												
													
														|  |        key: 'toggleRenderType',
 |  |        key: 'toggleRenderType',
 | 
											
												
													
														|  |        icon: iconRender({ icon: asRawText.value ? 'ic:outline-code-off' : 'ic:outline-code' }),
 |  |        icon: iconRender({ icon: asRawText.value ? 'ic:outline-code-off' : 'ic:outline-code' }),
 | 
											
												
													
														|  | 
 |  | +    });
 | 
											
												
													
														|  | 
 |  | +    common.unshift({
 | 
											
												
													
														|  | 
 |  | +      label: t('mj.tts'),
 | 
											
												
													
														|  | 
 |  | +      key: 'tts',
 | 
											
												
													
														|  | 
 |  | +      icon: iconRender({ icon:'mdi:tts' }),
 | 
											
												
													
														|  |      })
 |  |      })
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    return common
 |  |    return common
 | 
											
												
													
														|  |  })
 |  |  })
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType') {
 |  | 
 | 
											
												
													
														|  | 
 |  | +function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType' |'tts') {
 | 
											
												
													
														|  |    switch (key) {
 |  |    switch (key) {
 | 
											
												
													
														|  | 
 |  | +    case 'tts': 
 | 
											
												
													
														|  | 
 |  | +      homeStore.setMyData({act:'gpt.ttsv2', actData:{ index:props.index , uuid:props.chat.uuid, text:props.text } });
 | 
											
												
													
														|  | 
 |  | +      return;
 | 
											
												
													
														|  |      case 'copyText':
 |  |      case 'copyText':
 | 
											
												
													
														|  |        handleCopy()
 |  |        handleCopy()
 | 
											
												
													
														|  |        return
 |  |        return
 | 
											
										
											
												
													
														|  | @@ -80,14 +88,19 @@ function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType') {
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +function handleRegenerate() {
 | 
											
												
													
														|  | 
 |  | +  messageRef.value?.scrollIntoView()
 | 
											
												
													
														|  | 
 |  | +  emit('regenerate')
 | 
											
												
													
														|  | 
 |  | +}
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  async function handleCopy(txt?:string) {
 |  |  async function handleCopy(txt?:string) {
 | 
											
												
													
														|  |    try {
 |  |    try {
 | 
											
												
													
														|  |      await copyToClip( txt|| props.text || '')
 |  |      await copyToClip( txt|| props.text || '')
 | 
											
												
													
														|  | -    message.success('复制成功')
 |  | 
 | 
											
												
													
														|  | 
 |  | +    message.success( t('chat.copied'))
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |    catch {
 |  |    catch {
 | 
											
												
													
														|  | -    message.error('复制失败')
 |  | 
 | 
											
												
													
														|  | 
 |  | +    message.error( t('mj.copyFail') )
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -101,7 +114,7 @@ function handleRegenerate2() {
 | 
											
												
													
														|  |    mlog('重新发送!');
 |  |    mlog('重新发送!');
 | 
											
												
													
														|  |    homeStore.setMyData({act:'gpt.resubmit', actData:{ index:props.index , uuid:props.chat.uuid } });
 |  |    homeStore.setMyData({act:'gpt.resubmit', actData:{ index:props.index , uuid:props.chat.uuid } });
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | + 
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  <template>
 |  |  <template>
 | 
											
										
											
												
													
														|  | @@ -117,7 +130,7 @@ function handleRegenerate2() {
 | 
											
												
													
														|  |        <AvatarComponent :image="inversion" :logo="chat.logo"/>
 |  |        <AvatarComponent :image="inversion" :logo="chat.logo"/>
 | 
											
												
													
														|  |      </div>
 |  |      </div>
 | 
											
												
													
														|  |      <div class="overflow-hidden text-sm " :class="[inversion ? 'items-end' : 'items-start']">
 |  |      <div class="overflow-hidden text-sm " :class="[inversion ? 'items-end' : 'items-start']">
 | 
											
												
													
														|  | -      <p class="text-xs group  text-[#b4bbc4] flex justify-start items-center space-x-2 " :class="[inversion ? 'text-right' : 'text-left']">
 |  | 
 | 
											
												
													
														|  | 
 |  | +      <p class="text-xs group  text-[#b4bbc4] flex  items-center space-x-2 " :class="[inversion ? 'justify-end' : 'justify-start']">
 | 
											
												
													
														|  |          <span>{{ dateTime }}</span>
 |  |          <span>{{ dateTime }}</span>
 | 
											
												
													
														|  |          <span v-if="chat.model"  class="text-[#b4bbc4]/50">{{ chat.model }}</span>
 |  |          <span v-if="chat.model"  class="text-[#b4bbc4]/50">{{ chat.model }}</span>
 | 
											
												
													
														|  |          <!-- <span>{{ chat.opt?.progress }}</span> -->
 |  |          <!-- <span>{{ chat.opt?.progress }}</span> -->
 | 
											
										
											
												
													
														|  | @@ -128,15 +141,12 @@ function handleRegenerate2() {
 | 
											
												
													
														|  |              <span v-if="chat.opt?.seed">Seed:{{ chat.opt?.seed }}</span>
 |  |              <span v-if="chat.opt?.seed">Seed:{{ chat.opt?.seed }}</span>
 | 
											
												
													
														|  |              <span v-else>Seed</span>
 |  |              <span v-else>Seed</span>
 | 
											
												
													
														|  |            </div>
 |  |            </div>
 | 
											
												
													
														|  | -          <a :href="chat.opt?.imageUrl" class="hidden group-hover:block active  cursor-pointer underline " target="_blank">原图链接</a>
 |  | 
 | 
											
												
													
														|  | 
 |  | +          <a :href=" mjImgUrl(chat.opt?.imageUrl)" class="hidden group-hover:block active  cursor-pointer underline " target="_blank">{{ $t('mj.ulink') }}</a>
 | 
											
												
													
														|  |          </template>
 |  |          </template>
 | 
											
												
													
														|  |        </p>
 |  |        </p>
 | 
											
												
													
														|  |        
 |  |        
 | 
											
												
													
														|  | -      <div
 |  | 
 | 
											
												
													
														|  | -        class="flex items-end gap-1 mt-2"
 |  | 
 | 
											
												
													
														|  | -        :class="[inversion ? 'flex-row-reverse' : 'flex-row']"
 |  | 
 | 
											
												
													
														|  | -      >
 |  | 
 | 
											
												
													
														|  | -        
 |  | 
 | 
											
												
													
														|  | 
 |  | +      <div  class="flex items-end gap-1 mt-2"
 | 
											
												
													
														|  | 
 |  | +        :class="[inversion ? 'flex-row-reverse' : 'flex-row']" > 
 | 
											
												
													
														|  |          <TextComponent 
 |  |          <TextComponent 
 | 
											
												
													
														|  |            ref="textRef"
 |  |            ref="textRef"
 | 
											
												
													
														|  |            :inversion="inversion"
 |  |            :inversion="inversion"
 |