index.ts
1 import { feature } from 'bun:bundle' 2 import { isBridgeEnabled } from '../../bridge/bridgeEnabled.js' 3 import type { Command } from '../../commands.js' 4 5 function isEnabled(): boolean { 6 if (!feature('BRIDGE_MODE')) { 7 return false 8 } 9 return isBridgeEnabled() 10 } 11 12 const bridge = { 13 type: 'local-jsx', 14 name: 'remote-control', 15 aliases: ['rc'], 16 description: 'Connect this terminal for remote-control sessions', 17 argumentHint: '[name]', 18 isEnabled, 19 get isHidden() { 20 return !isEnabled() 21 }, 22 immediate: true, 23 load: () => import('./bridge.js'), 24 } satisfies Command 25 26 export default bridge