Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions web/src/app/chat/RegenerateOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Hoverable } from "@/components/Hoverable";
import { Popover } from "@/components/popover/Popover";
import { StarFeedback } from "@/components/icons/icons";
import { IconType } from "react-icons";
import { FiRefreshCw } from "react-icons/fi";

export function RegenerateDropdown({
options,
Expand Down Expand Up @@ -68,7 +69,7 @@ export function RegenerateDropdown({
py-1.5
"
>
Pick a model
Regenerate with
</p>
{options.map((option, ind) => {
const isSelected = option.value === selected;
Expand All @@ -92,7 +93,7 @@ export function RegenerateDropdown({
content={
<div onClick={() => toggleDropdownVisible(!isOpen)}>
{!alternate ? (
<Hoverable size={16} icon={StarFeedback as IconType} />
<Hoverable size={16} icon={FiRefreshCw as IconType} />
) : (
<Hoverable
size={16}
Expand Down
30 changes: 22 additions & 8 deletions web/src/app/chat/message/Messages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@ export const AIMessage = ({
className={"py-5 ml-4 px-5 relative flex "}
>
<div
className={`mx-auto ${shared ? "w-full" : "w-[90%]"} max-w-message-max`}
className={`mx-auto ${
shared ? "w-full" : "w-[90%]"
} max-w-message-max`}
>
<div className={`desktop:mr-12 ${!shared && "mobile:ml-0 md:ml-8"}`}>
<div className="flex">
Expand Down Expand Up @@ -545,9 +547,21 @@ export const AIMessage = ({
className={`
absolute -bottom-5
z-10
invisible ${(isHovering || isRegenerateHovered || settings?.isMobile) && "!visible"}
opacity-0 ${(isHovering || isRegenerateHovered || settings?.isMobile) && "!opacity-100"}
translate-y-2 ${(isHovering || settings?.isMobile) && "!translate-y-0"}
invisible ${
(isHovering ||
isRegenerateHovered ||
settings?.isMobile) &&
"!visible"
}
opacity-0 ${
(isHovering ||
isRegenerateHovered ||
settings?.isMobile) &&
"!opacity-100"
}
translate-y-2 ${
(isHovering || settings?.isMobile) && "!translate-y-0"
}
transition-transform duration-300 ease-in-out
flex md:flex-row gap-x-0.5 bg-background-125/40 -mx-1.5 p-1.5 rounded-lg
`}
Expand Down Expand Up @@ -703,9 +717,7 @@ export const HumanMessage = ({
}, [isEditing]);

const handleEditSubmit = () => {
if (editedContent.trim() !== content.trim()) {
onEdit?.(editedContent);
}
onEdit?.(editedContent);
setIsEditing(false);
};

Expand All @@ -721,7 +733,9 @@ export const HumanMessage = ({
onMouseLeave={() => setIsHovered(false)}
>
<div
className={`text-user-text mx-auto ${shared ? "w-full" : "w-[90%]"} max-w-[790px]`}
className={`text-user-text mx-auto ${
shared ? "w-full" : "w-[90%]"
} max-w-[790px]`}
>
<div className="xl:ml-8">
<div className="flex flex-col mr-4">
Expand Down
Loading