Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

512 B
Raw Blame
import { useStoreDispatch } from "@/state/store-select";

/** Opens Files, offering `suggest` (folders on this computer) for sharing. Render it only where cloudFilesBridge() is. */
export function OpenFilesButton({ label, suggest, className = "ui-button" }: { label: string; suggest?: string[]; className?: string }) {
  const dispatch = useStoreDispatch();
  return <button type="button" className={className} onClick={() => dispatch({ type: "showFiles", ...(suggest ? { suggest } : {}) })}>{label}</button>;
}