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