From 5101fab9621ca33ed6b6a261b205173910da4654 Mon Sep 17 00:00:00 2001 From: Bohdan Triapitsyn Date: Tue, 7 Jul 2026 10:32:13 +0300 Subject: [PATCH] fix: keep local file picker mounted during composer swaps Moves the hidden file input out of the attachment controls so it stays mounted. Prevents file selections from being lost when the composer variant changes. Restores reliable local attachment uploads after opening the OS picker. --- packages/ui/src/components/chat/ChatInput.tsx | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/packages/ui/src/components/chat/ChatInput.tsx b/packages/ui/src/components/chat/ChatInput.tsx index 18b93fc6..a0a2b24f 100644 --- a/packages/ui/src/components/chat/ChatInput.tsx +++ b/packages/ui/src/components/chat/ChatInput.tsx @@ -527,8 +527,6 @@ type ComposerAttachmentControlsProps = { isVSCode: boolean; footerIconButtonClass: string; iconSizeClass: string; - fileInputRef: React.RefObject; - handleLocalFileSelect: (event: React.ChangeEvent) => void | Promise; handlePickLocalFiles: () => void; openIssuePicker: () => void; openPrPicker: () => void; @@ -544,8 +542,6 @@ const ComposerAttachmentControls = React.memo(function ComposerAttachmentControl isVSCode, footerIconButtonClass, iconSizeClass, - fileInputRef, - handleLocalFileSelect, handlePickLocalFiles, openIssuePicker, openPrPicker, @@ -554,15 +550,6 @@ const ComposerAttachmentControls = React.memo(function ComposerAttachmentControl return (
- -
{props.onOpenMobileSheet ? (