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.

623 B
Raw Blame
import { stableWorkspaceAwareNavigate } from '@/features/Workspace/stableWorkspaceAwareNavigate';
import { type WorkspaceAwareNavigateOptions } from '@/features/Workspace/workspaceAwarePath';

export type AppNavigateTarget = 'activeTab' | 'newTab';

export interface AppNavigateOptions extends WorkspaceAwareNavigateOptions {
  target?: AppNavigateTarget;
}

export const appNavigate = (to: string, opts: AppNavigateOptions = {}): void => {
  // Web has a single router; `target` (active vs new tab) is desktop-only.
  const { target: _target, ...rest } = opts;
  void _target;
  stableWorkspaceAwareNavigate(to, rest);
};