diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 9d7275686bf..816bca7b49c 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -159,6 +159,7 @@ import { CircleAlertIcon, ListTodoIcon, PencilRulerIcon, + PlusIcon, type LucideIcon, LockIcon, LockOpenIcon, @@ -982,6 +983,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) const mobileComposerExpandReleaseFrameRef = useRef(null); const mobileComposerExpandInFlightRef = useRef(false); const dragDepthRef = useRef(0); + const imageFileInputRef = useRef(null); // ------------------------------------------------------------------ // Derived: composer send state @@ -1938,6 +1940,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) removeComposerImageFromDraft(imageId); }; + const onImageFileInputChange = (event: React.ChangeEvent) => { + const files = Array.from(event.target.files ?? []); + event.target.value = ""; + addComposerImages(files); + }; + // ------------------------------------------------------------------ // Callbacks: paste / drag // ------------------------------------------------------------------ @@ -2697,18 +2705,38 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps) )} {isComposerFooterCompact ? ( - + <> + + + + ) : ( <> {providerTraitsPicker ? (