|
|
@ -1,6 +1,8 @@
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
|
|
|
|
ActionIcon,
|
|
|
|
Box,
|
|
|
|
Box,
|
|
|
|
Group,
|
|
|
|
Group,
|
|
|
|
|
|
|
|
HoverCard,
|
|
|
|
JsonInput,
|
|
|
|
JsonInput,
|
|
|
|
List,
|
|
|
|
List,
|
|
|
|
Stack,
|
|
|
|
Stack,
|
|
|
@ -210,21 +212,43 @@ function Messages({
|
|
|
|
key={index}
|
|
|
|
key={index}
|
|
|
|
justify={message.role === "user" ? "flex-end" : "flex-start"}
|
|
|
|
justify={message.role === "user" ? "flex-end" : "flex-start"}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Box
|
|
|
|
<HoverCard
|
|
|
|
w="75%"
|
|
|
|
shadow="md"
|
|
|
|
bg={
|
|
|
|
position={message.role === "user" ? "left" : "right"}
|
|
|
|
message.role === "user"
|
|
|
|
|
|
|
|
? theme.colors.gray[2]
|
|
|
|
|
|
|
|
: theme.colors.blue[2]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
p="md"
|
|
|
|
|
|
|
|
bdrs="md"
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<div>
|
|
|
|
<HoverCard.Target>
|
|
|
|
{"index" in message ? message.index : ""} {message.role}
|
|
|
|
<Box
|
|
|
|
</div>
|
|
|
|
w="75%"
|
|
|
|
<Markdown>{message.content}</Markdown>
|
|
|
|
bg={
|
|
|
|
</Box>
|
|
|
|
message.role === "user"
|
|
|
|
|
|
|
|
? theme.colors.gray[2]
|
|
|
|
|
|
|
|
: theme.colors.blue[2]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
p="md"
|
|
|
|
|
|
|
|
bdrs="md"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
{"index" in message ? message.index : ""} {message.role}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<Markdown>{message.content}</Markdown>
|
|
|
|
|
|
|
|
</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>
|
|
|
|