Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
type BulkClosableTab = {
id: string
isDirty?: boolean
isPinned?: boolean
}
// Skip dirty documents during bulk close because mobile has no save prompt to protect unsaved edits.
export function selectBulkCloseTabs<T extends BulkClosableTab>(
tabs: readonly T[],
anchorTabId: string
): T[] {
const anchorIndex = tabs.findIndex((tab) => tab.id === anchorTabId)
if (anchorIndex === -1) {
return []
}
const candidates = tabs.filter((_, index) => index !== anchorIndex)
return candidates.filter((tab) => tab.isDirty !== true && tab.isPinned !== true)
}