|
|
@ -31,6 +31,8 @@ const textRef = ref<HTMLElement>()
|
|
|
|
|
|
|
|
|
|
|
|
const asRawText = ref(props.inversion)
|
|
|
|
const asRawText = ref(props.inversion)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const messageRef = ref<HTMLElement>()
|
|
|
|
|
|
|
|
|
|
|
|
const options = computed(() => {
|
|
|
|
const options = computed(() => {
|
|
|
|
const common = [
|
|
|
|
const common = [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -70,12 +72,17 @@ function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType') {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function handleRegenerate() {
|
|
|
|
function handleRegenerate() {
|
|
|
|
|
|
|
|
messageRef.value?.scrollIntoView()
|
|
|
|
emit('regenerate')
|
|
|
|
emit('regenerate')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="flex w-full mb-6 overflow-hidden" :class="[{ 'flex-row-reverse': inversion }]">
|
|
|
|
<div
|
|
|
|
|
|
|
|
ref="messageRef"
|
|
|
|
|
|
|
|
class="flex w-full mb-6 overflow-hidden"
|
|
|
|
|
|
|
|
:class="[{ 'flex-row-reverse': inversion }]"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
class="flex items-center justify-center flex-shrink-0 h-8 overflow-hidden rounded-full basis-8"
|
|
|
|
class="flex items-center justify-center flex-shrink-0 h-8 overflow-hidden rounded-full basis-8"
|
|
|
|
:class="[inversion ? 'ml-2' : 'mr-2']"
|
|
|
|
:class="[inversion ? 'ml-2' : 'mr-2']"
|
|
|
|