diff --git a/client/src/components/Chat/Input/Files/AttachFileMenu.tsx b/client/src/components/Chat/Input/Files/AttachFileMenu.tsx index 59597171dd..182cfa19d6 100644 --- a/client/src/components/Chat/Input/Files/AttachFileMenu.tsx +++ b/client/src/components/Chat/Input/Files/AttachFileMenu.tsx @@ -144,7 +144,7 @@ const AttachFileMenu = ({ /** Unified mode: single click triggers file upload with no tool_resource */ const handleUnifiedUpload = () => { - setToolResource(undefined); + toolResourceRef.current = undefined; handleUploadClick(); }; @@ -314,7 +314,7 @@ const AttachFileMenu = ({ { - handleFileChange(e, toolResource); + handleFileChange(e, toolResourceRef.current); }} >