Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

580 B
Raw Blame
import { useSettings } from '../state/settings'

/**
 * The ONE write path for "Reach this Mac from anywhere" (`settings.phoneAccessEnabled`): persist
 * the setting AND start/stop the standing relay host immediately. Three surfaces flip it (the
 * toolbar toggle, the quick-pair popover, Settings → Phone); a caller that only wrote the setting
 * would leave the host running until the next launch.
 */
export function applyPhoneAccess(next: boolean): void {
  useSettings.getState().update({ phoneAccessEnabled: next })
  window.nodeTerminal.remoteHost.setPhoneAccess(next)
}