Skip to content

Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.

517 B
Raw Blame
import { useCurrentViewId, useParams } from '@renderer/lib/layout/navigation-provider';

export function useIsActiveSession(sessionId: string): boolean {
  // Deliberately not useWorkspaceSlots: this hook is reachable from the session
  // view, so loading the view registry here would make the registry depend on
  // its own members being initialised first.
  const currentView = useCurrentViewId();
  const { params } = useParams('session');
  return currentView === 'session' && params.sessionId === sessionId;
}