Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Keep ChatView within its size ratchet

Krishna Dobhal95fd84101bb1
diff --git a/src/components/ChatView.tsx b/src/components/ChatView.tsx
index de17114880..3e86c58407 100644
--- a/src/components/ChatView.tsx
+++ b/src/components/ChatView.tsx
@@ -408,8 +408,7 @@ const Bubble = memo(function Bubble({
const togglePin = () =>
dispatch({ type: "updateTask", botId, threadId, patch: { pinnedMessageId: pinned ? "" : message.id } });
const botActions = !user && (
- <MessageActions side="bot" forceOpen={viewRaw || speaking} menu={simple ? [...replyAndCopy(() => onReply(message), text), ...botMenu, ...forkAction] : [...botMenu, ...forkAction]}
- contextItems={simple ? undefined : replyAndCopy(() => onReply(message), text)}>
+ <MessageActions side="bot" forceOpen={viewRaw || speaking} menu={simple ? [...replyAndCopy(() => onReply(message), text), ...botMenu, ...forkAction] : [...botMenu, ...forkAction]} contextItems={simple ? undefined : replyAndCopy(() => onReply(message), text)}>
{!simple && <ReplyAction onReply={() => onReply(message)} />}
{canReact && !peer && <ReactAction threadId={threadId} message={message} />}
{!simple && text && <CopyButton text={text} className={messageActionClass} />}
@@ -425,8 +424,7 @@ const Bubble = memo(function Bubble({
<div className={cn("flex w-full items-center gap-1.5", user ? "justify-end" : "justify-start")}>
{user && (
<MessageActions
- side="user"
- contextItems={simple ? undefined : replyAndCopy(() => onReply(message), visibleText)}
+ side="user" contextItems={simple ? undefined : replyAndCopy(() => onReply(message), visibleText)}
menu={[
...(simple ? replyAndCopy(() => onReply(message), visibleText) : []),
...userMessageMenu({