buttons on hover over message
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
|
ActionIcon,
|
||||||
Box,
|
Box,
|
||||||
Group,
|
Group,
|
||||||
|
HoverCard,
|
||||||
JsonInput,
|
JsonInput,
|
||||||
List,
|
List,
|
||||||
Stack,
|
Stack,
|
||||||
@@ -210,6 +212,11 @@ function Messages({
|
|||||||
key={index}
|
key={index}
|
||||||
justify={message.role === "user" ? "flex-end" : "flex-start"}
|
justify={message.role === "user" ? "flex-end" : "flex-start"}
|
||||||
>
|
>
|
||||||
|
<HoverCard
|
||||||
|
shadow="md"
|
||||||
|
position={message.role === "user" ? "left" : "right"}
|
||||||
|
>
|
||||||
|
<HoverCard.Target>
|
||||||
<Box
|
<Box
|
||||||
w="75%"
|
w="75%"
|
||||||
bg={
|
bg={
|
||||||
@@ -225,6 +232,23 @@ function Messages({
|
|||||||
</div>
|
</div>
|
||||||
<Markdown>{message.content}</Markdown>
|
<Markdown>{message.content}</Markdown>
|
||||||
</Box>
|
</Box>
|
||||||
|
</HoverCard.Target>
|
||||||
|
<HoverCard.Dropdown>
|
||||||
|
<ActionIcon.Group>
|
||||||
|
<ActionIcon size="lg" variant="filled" color="red">
|
||||||
|
<IconTrash
|
||||||
|
size={16}
|
||||||
|
stroke={1.5}
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
|
// handleDeleteMessage(message.id);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ActionIcon>
|
||||||
|
</ActionIcon.Group>
|
||||||
|
</HoverCard.Dropdown>
|
||||||
|
</HoverCard>
|
||||||
{"runningSummary" in message && message.runningSummary && (
|
{"runningSummary" in message && message.runningSummary && (
|
||||||
<Box w="75%" bd="dotted" p="md" bdrs="md">
|
<Box w="75%" bd="dotted" p="md" bdrs="md">
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user