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.

2.0 KB
Raw Blame
export interface NavigationBroadcastEvents {
  /**
   * Ask renderer to close the active tab, or fall back to closing the window
   * when only one (or zero) tab is left. Triggered by Cmd/Ctrl+W on the main window.
   */
  closeCurrentTabOrWindow: () => void;

  /**
   * Ask renderer to create a new agent.
   * Triggered from the main process File menu.
   */
  createNewAgent: () => void;

  /**
   * Ask renderer to create a new agent group (group chat).
   * Triggered from the main process File menu.
   */
  createNewAgentGroup: () => void;

  /**
   * Ask renderer to create a new page.
   * Triggered from the main process File menu.
   */
  createNewPage: () => void;

  /**
   * Ask renderer to open a new tab, optionally at a specific path.
   * Triggered by Cmd/Ctrl+T on the main window and menu actions that need a fresh tab.
   */
  createNewTab: (data?: { path: string }) => void;

  /**
   * Ask renderer to create a new topic (start a new conversation).
   * Triggered from the main process File menu.
   */
  createNewTopic: () => void;

  /**
   * Ask renderer to go back in navigation history.
   * Triggered from the main process menu.
   */
  historyGoBack: () => void;

  /**
   * Ask renderer to go forward in navigation history.
   * Triggered from the main process menu.
   */
  historyGoForward: () => void;

  /**
   * Ask renderer to navigate within the SPA without reloading the whole page.
   */
  navigate: (data: { escape?: boolean; path: string; replace?: boolean }) => void;

  /** Ask the renderer to open the all-agents surface. */
  openAllAgents: () => void;

  /**
   * Ask renderer to open its current workspace (or personal home) in a new window.
   * Triggered from the main process File menu.
   */
  openNewWindow: () => void;

  /** Ask the renderer to open the Recently Viewed surface. */
  openRecentlyViewed: () => void;

  /**
   * Ask renderer to reopen the most recently closed tab (or bulk-closed tabs).
   * Triggered by Cmd/Ctrl+Shift+T on the main window.
   */
  reopenClosedTab: () => void;
}