mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-02 07:41:49 +01:00
* feat(sharepoint): integrate SharePoint file picker and download workflow Introduces end‑to‑end SharePoint import support: * Token exchange with Microsoft Graph and scope management (`useSharePointToken`) * Re‑usable hooks: `useSharePointPicker`, `useSharePointDownload`, `useSharePointFileHandling` * FileSearch dropdown now offers **From Local Machine** / **From SharePoint** sources and gracefully falls back when SharePoint is disabled * Agent upload model, `AttachFileMenu`, and `DropdownPopup` extended for SharePoint files and sub‑menus * Blurry overlay with progress indicator and `maxSelectionCount` limit during downloads * Cache‑flush utility (`config/flush-cache.js`) supporting Redis & filesystem, with dry‑run and npm script * Updated `SharePointIcon` (uses `currentColor`) and new i18n keys * Bug fixes: placeholder syntax in progress message, picker event‑listener cleanup * Misc style and performance optimizations * Fix ESLint warnings --------- Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
28 lines
623 B
TypeScript
28 lines
623 B
TypeScript
import type { TFile } from 'librechat-data-provider';
|
|
import type { ExtendedFile } from '~/common';
|
|
|
|
export default function FileIcon({
|
|
file,
|
|
fileType,
|
|
}: {
|
|
file?: Partial<ExtendedFile | TFile>;
|
|
fileType: {
|
|
fill: string;
|
|
paths: React.FC;
|
|
title: string;
|
|
};
|
|
}) {
|
|
return (
|
|
<svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
viewBox="0 0 36 36"
|
|
fill="none"
|
|
className="h-10 w-10 flex-shrink-0"
|
|
width="36"
|
|
height="36"
|
|
>
|
|
<rect width="36" height="36" rx="6" fill={fileType.fill} />
|
|
{(file?.['progress'] ?? 1) >= 1 && <>{<fileType.paths />}</>}
|
|
</svg>
|
|
);
|
|
}
|