diff --git a/frontend/src/components/message/EditableUserMessage.tsx b/frontend/src/components/message/EditableUserMessage.tsx index a9a58aa1..a3e82bbc 100644 --- a/frontend/src/components/message/EditableUserMessage.tsx +++ b/frontend/src/components/message/EditableUserMessage.tsx @@ -2,6 +2,7 @@ import { memo, useState, useRef, useEffect } from 'react' import { Send, X, Pencil, Loader2 } from 'lucide-react' import { useRefreshMessage } from '@/hooks/useRemoveMessage' import { useUIState } from '@/stores/uiStateStore' +import { useMobile } from '@/hooks/useMobile' interface EditableUserMessageProps { opcodeUrl: string @@ -129,6 +130,8 @@ export const ClickableUserMessage = memo(function ClickableUserMessage({ onClick, isEditable }: ClickableUserMessageProps) { + const isMobile = useMobile() + if (!isEditable) { return (
@@ -144,7 +147,7 @@ export const ClickableUserMessage = memo(function ClickableUserMessage({ title="Click to edit and resend" > {content} - + ) }) \ No newline at end of file diff --git a/frontend/src/components/message/MessageActionButtons.tsx b/frontend/src/components/message/MessageActionButtons.tsx index 8408c38d..868bc59b 100644 --- a/frontend/src/components/message/MessageActionButtons.tsx +++ b/frontend/src/components/message/MessageActionButtons.tsx @@ -1,6 +1,7 @@ import { memo } from 'react' import { X, RefreshCw, Loader2 } from 'lucide-react' import { useRemoveMessage, useRefreshMessage } from '@/hooks/useRemoveMessage' +import { useMobile } from '@/hooks/useMobile' import type { MessageWithParts } from '@/api/types' interface MessageActionButtonsProps { @@ -26,6 +27,7 @@ export const MessageActionButtons = memo(function MessageActionButtons({ model, agent }: MessageActionButtonsProps) { + const isMobile = useMobile() const removeMessage = useRemoveMessage({ opcodeUrl, sessionId, directory }) const refreshMessage = useRefreshMessage({ opcodeUrl, sessionId, directory }) @@ -56,7 +58,7 @@ export const MessageActionButtons = memo(function MessageActionButtons({ } return ( -
+