index.ts 604 B

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