Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

716 B
Raw Blame
'use client';

import type { ReactNode } from 'react';

import { DirectoryBrowser } from './DirectoryBrowser';
import { useDeviceDirectorySource } from './sources/useDeviceDirectorySource';

interface RemoteDirectoryBrowserProps {
  defaultPath?: string;
  deviceId: string;
  error?: string;
  loading: boolean;
  onCancel: () => void;
  onManual: (path: string) => void;
  onSelect: (path: string) => void;
  pickExtra?: ReactNode;
}

/** {@link DirectoryBrowser} over a connected device's folders. */
export const RemoteDirectoryBrowser = ({ deviceId, ...props }: RemoteDirectoryBrowserProps) => {
  const source = useDeviceDirectorySource(deviceId);

  return <DirectoryBrowser {...props} source={source} />;
};