agent-ecosystem/src/renderer/components/team/attachments/DropZoneOverlay.tsx
iliya a30f8ab879 fix: enhance message sending reliability and error handling
- Improved the message sending process in `handleSendMessage` by separating try blocks for stdin delivery and persistence, preventing fallback to inbox on stdin success.
- Added logging for persistence failures after stdin delivery to ensure better tracking of issues.
- Updated `TeamSentMessagesStore` to handle IO errors gracefully, preserving optional fields and preventing crashes.
- Enhanced `MessageComposer` to clear draft only after successful message send, improving user experience.
2026-02-24 20:29:41 +02:00

27 lines
834 B
TypeScript

import { ImagePlus } from 'lucide-react';
interface DropZoneOverlayProps {
active: boolean;
}
export const DropZoneOverlay = ({ active }: DropZoneOverlayProps): React.JSX.Element | null => {
if (!active) return null;
return (
<div
className="pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-md border-2 border-dashed backdrop-blur-[1px]"
style={{
borderColor: 'var(--color-accent, #6366f1)',
backgroundColor: 'color-mix(in srgb, var(--color-accent, #6366f1) 10%, transparent)',
}}
>
<div
className="flex flex-col items-center gap-1.5"
style={{ color: 'var(--color-accent, #6366f1)' }}
>
<ImagePlus size={24} />
<span className="text-xs font-medium">Drop images here</span>
</div>
</div>
);
};