Revert "feat: copy messages on hoverable icon (#1492)" (#1508)

This commit is contained in:
Alex Hancock
2025-03-04 14:08:01 -05:00
committed by GitHub
parent 48838c91c4
commit 7b767abfe6
5 changed files with 25 additions and 59 deletions
+1 -10
View File
@@ -12,7 +12,6 @@ import {
getToolConfirmationContent,
} from '../types/message';
import ToolCallConfirmation from './ToolCallConfirmation';
import CopyButton from './ui/CopyButton';
interface GooseMessageProps {
message: Message;
@@ -68,17 +67,9 @@ export default function GooseMessage({ message, metadata, messages, append }: Go
{/* Always show the top content area if there are tool calls, even if textContent is empty */}
{(textContent || toolRequests.length > 0) && (
<div
className={`goose-message-content bg-bgSubtle rounded-2xl px-4 py-2 ${toolRequests.length > 0 ? 'rounded-b-none' : ''} relative group`}
className={`goose-message-content bg-bgSubtle rounded-2xl px-4 py-2 ${toolRequests.length > 0 ? 'rounded-b-none' : ''}`}
>
{textContent ? <MarkdownContent content={textContent} /> : null}
{/* Only show CopyButton if there's text content and no tool requests/responses */}
{textContent && message.content.every((content) => content.type === 'text') && (
<CopyButton
text={textContent}
className="absolute -bottom-2 -right-2 p-1.5 rounded-full bg-white dark:bg-gray-800 shadow-md z-[1000] hover:bg-gray-100 dark:hover:bg-gray-700 opacity-0 group-hover:opacity-100 transition-opacity"
iconClassName="h-4 w-4 text-gray-800 dark:text-white"
/>
)}
</div>
)}