import type { DetailTabId } from './urlState';

/**
 * Whether the live-workspace auto-focus should be active: only when a task is
 * selected AND the active detail tab is a live view (the AI browser or SSH
 * console), which benefit from the wider focused layout.
 */
export function shouldAutoFocus(detailTab: DetailTabId, hasTask: boolean): boolean {
  return hasTask && (detailTab === 'browser' || detailTab === 'ssh');
}
