Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

330 B
Raw Blame
const normalizePathname = (pathname: string): string =>
  pathname.length > 1 ? pathname.replace(/\/+$/, '') : pathname;

export function missingHashRedirectTarget(pathname: string, search: string): string {
  if (normalizePathname(pathname) === '/auth') {
    return `/#/auth${search}`;
  }

  return `${pathname}${search}#/`;
}