File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/views/chat/components/Message Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ const textRef = ref<HTMLElement>()
31
31
32
32
const asRawText = ref (props .inversion )
33
33
34
+ const messageRef = ref <HTMLElement >()
35
+
34
36
const options = computed (() => {
35
37
const common = [
36
38
{
@@ -70,12 +72,17 @@ function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType') {
70
72
}
71
73
72
74
function handleRegenerate() {
75
+ messageRef .value ?.scrollIntoView ()
73
76
emit (' regenerate' )
74
77
}
75
78
</script >
76
79
77
80
<template >
78
- <div class =" flex w-full mb-6 overflow-hidden" :class =" [{ 'flex-row-reverse': inversion }]" >
81
+ <div
82
+ ref =" messageRef"
83
+ class =" flex w-full mb-6 overflow-hidden"
84
+ :class =" [{ 'flex-row-reverse': inversion }]"
85
+ >
79
86
<div
80
87
class =" flex items-center justify-center flex-shrink-0 h-8 overflow-hidden rounded-full basis-8"
81
88
:class =" [inversion ? 'ml-2' : 'mr-2']"
You can’t perform that action at this time.
0 commit comments