feat(sidebar): enhance DocumentsSidebar with dropdown menu for local folder management and improve UI interactions

This commit is contained in:
Anish Sarkar 2026-04-24 04:42:24 +05:30
parent b5400caea6
commit d1c14160e3
2 changed files with 89 additions and 71 deletions

View file

@ -61,16 +61,6 @@ export function LocalFilesystemBrowser({
const [expandedFolderKeys, setExpandedFolderKeys] = useState<Set<string>>(new Set());
const supportedExtensions = useMemo(() => Array.from(getSupportedExtensionsSet()), []);
useEffect(() => {
setExpandedFolderKeys((prev) => {
const next = new Set(prev);
for (const rootPath of rootPaths) {
next.add(rootPath);
}
return next;
});
}, [rootPaths]);
useEffect(() => {
if (!electronAPI?.listFolderFiles) return;
let cancelled = false;