mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-04 21:32:10 +00:00
🐛 fix: unified attach button referenced undeclared toolResource
handleUnifiedUpload called setToolResource(undefined) and the unified-mode FileUpload passed a bare `toolResource` — neither is declared at component scope (only toolResourceRef exists; setToolResource is local to dropdownItems). Clicking the single attach button therefore threw a ReferenceError and never opened the file picker, so the unified upload flow was dead. Use toolResourceRef.current, matching the legacy path. Slipped past CI because the client builds via Vite (transpile-only) and the TypeScript-check job doesn't cover client/. Caught by the new e2e/specs/mock/unified-upload.spec.ts.
This commit is contained in:
parent
e351280207
commit
b488672ae6
1 changed files with 2 additions and 2 deletions
|
|
@ -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 = ({
|
|||
<FileUpload
|
||||
ref={inputRef}
|
||||
handleFileChange={(e) => {
|
||||
handleFileChange(e, toolResource);
|
||||
handleFileChange(e, toolResourceRef.current);
|
||||
}}
|
||||
>
|
||||
<TooltipAnchor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue