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