From d83958d3b3f0328972c050488a1ac12467a260ef Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Tue, 1 Sep 2026 12:59:50 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8E=20fix:=20Keep=20SharePoint=20Picke?= =?UTF-8?q?r=20Selections=20While=20Navigating=20(#15389)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The picker never set `selection.enablePersistence`, so it dropped the current selection every time the user opened another folder or switched pivot. A selection could only ever be assembled from a single location — pick three files, open another folder, and the three are gone. One option on the picker configuration; no change to what LibreChat does with the result. Fixes the selection half of #15237. Folder selection — the other half — is a new capability rather than a fix, and is parked on `feat/sharepoint-folder-selection`. --- client/src/hooks/Files/useSharePointPicker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/hooks/Files/useSharePointPicker.ts b/client/src/hooks/Files/useSharePointPicker.ts index e3812c1b25..05b68e95a4 100644 --- a/client/src/hooks/Files/useSharePointPicker.ts +++ b/client/src/hooks/Files/useSharePointPicker.ts @@ -285,6 +285,10 @@ export default function useSharePointPicker({ }, selection: { mode: 'multiple', + /** Without this the picker drops the current selection every time the user + * opens another folder or switches pivot, so a selection can only ever be + * assembled from one location. */ + enablePersistence: true, maximumCount: maxSelectionCount, }, title: localize('com_files_sharepoint_picker_title'),