Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

1.1 KB
Raw Blame
import type { ExecutionEnvironmentPlatformOs, FileManagerRevealKind } from "@akeru/contracts";

export function revealInFileExplorerLabel(platform: string): string {
  const normalized = platform.toLowerCase();

  if (normalized.includes("mac")) return "Reveal in Finder";

  if (normalized.includes("win")) return "Reveal in File Explorer";

  return "Reveal in Files";
}

/** Same wording keyed by an environment's reported OS rather than a
    navigator platform string, for actions that reveal on the server machine. */
export function revealInFileExplorerLabelForOs(os: ExecutionEnvironmentPlatformOs): string {
  if (os === "darwin") return "Reveal in Finder";

  if (os === "windows") return "Reveal in File Explorer";

  return "Reveal in Files";
}

/** Server-selected wording, including Windows File Explorer reached from WSL. */
export function revealInFileExplorerLabelForKind(kind: FileManagerRevealKind): string {
  if (kind === "finder") return "Reveal in Finder";

  if (kind === "file-explorer") return "Reveal in File Explorer";

  return "Reveal in Files";
}