@@ -17,7 +17,6 @@ import {
1717 getInteractiveOverrides ,
1818} from '../utils/participant-resolver.js' ;
1919import { printBanner } from '../utils/banner.js' ;
20- import * as interactiveUI from '../utils/interactive-ui.js' ;
2120import * as advancedInteractiveUI from '../utils/advanced-interactive-ui.js' ;
2221import { getTheme } from '../themes.js' ;
2322
@@ -894,15 +893,6 @@ async function spaceUpAction(options) {
894893 if ( options . interactive ) {
895894 console . log ( '\nConnecting interactively...\n' ) ;
896895
897- // Determine UI mode
898- const useDebugUI = options . debug || options . simple || options . noUi ;
899-
900- // Select appropriate UI module
901- const InteractiveUI = useDebugUI ? interactiveUI : null ;
902- const startAdvancedInteractiveUI = useDebugUI
903- ? null
904- : advancedInteractiveUI . startAdvancedInteractiveUI ;
905-
906896 try {
907897 // Resolve participant
908898 const participant = await resolveParticipant ( {
@@ -944,41 +934,27 @@ async function spaceUpAction(options) {
944934 const theme = getTheme ( themeName ) ;
945935
946936 // Display banner before starting UI
947- if ( ! useDebugUI ) {
948- printBanner ( {
949- spaceName : spaceName ,
950- spaceId : spaceId ,
951- participantId : participant . id ,
952- gateway : `ws://localhost:${ selectedPort } ` ,
953- color : process . env . NO_COLOR !== '1' ,
954- theme : theme
955- } ) ;
956- }
937+ printBanner ( {
938+ spaceName : spaceName ,
939+ spaceId : spaceId ,
940+ participantId : participant . id ,
941+ gateway : `ws://localhost:${ selectedPort } ` ,
942+ color : process . env . NO_COLOR !== '1' ,
943+ theme : theme
944+ } ) ;
957945
958- // Start interactive UI
959- if ( useDebugUI ) {
960- const defaultChatTargets = {
961- participant : Array . isArray ( config ?. participants ?. [ participant . id ] ?. default_to ?. chat )
962- ? config . participants [ participant . id ] . default_to . chat . slice ( )
963- : null ,
964- global : Array . isArray ( config ?. defaults ?. routing ?. default_to ?. chat )
965- ? config . defaults . routing . default_to . chat . slice ( )
966- : null
967- } ;
968- const ui = new InteractiveUI ( ws , participant . id , spaceId , defaultChatTargets ) ;
969- ui . start ( ) ;
970- } else {
971- // Compute default chat targets from config
972- const defaultChatTargets = {
973- participant : Array . isArray ( config ?. participants ?. [ participant . id ] ?. default_to ?. chat )
974- ? config . participants [ participant . id ] . default_to . chat . slice ( )
975- : null ,
976- global : Array . isArray ( config ?. defaults ?. routing ?. default_to ?. chat )
977- ? config . defaults . routing . default_to . chat . slice ( )
978- : null
979- } ;
980- startAdvancedInteractiveUI ( ws , participant . id , spaceId , themeName , defaultChatTargets ) ;
981- }
946+ // Compute default chat targets from config
947+ const defaultChatTargets = {
948+ participant : Array . isArray ( config ?. participants ?. [ participant . id ] ?. default_to ?. chat )
949+ ? config . participants [ participant . id ] . default_to . chat . slice ( )
950+ : null ,
951+ global : Array . isArray ( config ?. defaults ?. routing ?. default_to ?. chat )
952+ ? config . defaults . routing . default_to . chat . slice ( )
953+ : null
954+ } ;
955+
956+ // Start advanced interactive UI
957+ advancedInteractiveUI . startAdvancedInteractiveUI ( ws , participant . id , spaceId , themeName , defaultChatTargets ) ;
982958 } ) ;
983959
984960 ws . on ( 'error' , ( err ) => {
@@ -1003,9 +979,6 @@ space
1003979 . option ( '-i, --interactive' , 'Connect interactively after starting space' )
1004980 . option ( '--detach' , 'Run in background (default if not interactive)' )
1005981 . option ( '--participant <id>' , 'Connect as this participant (with --interactive)' )
1006- . option ( '--debug' , 'Use simple debug interface instead of advanced UI' )
1007- . option ( '--simple' , 'Alias for --debug' )
1008- . option ( '--no-ui' , 'Disable UI enhancements, use plain interface' )
1009982 . action ( spaceUpAction ) ;
1010983
1011984// Action handler for space down
@@ -1539,9 +1512,6 @@ space
15391512 . option ( '-d, --space-dir <path>' , 'Directory of space to connect to' , '.' )
15401513 . option ( '--participant <id>' , 'Connect as this participant' )
15411514 . option ( '--gateway <url>' , 'Override gateway URL (default: from running space)' )
1542- . option ( '--debug' , 'Use simple debug interface instead of advanced UI' )
1543- . option ( '--simple' , 'Alias for --debug' )
1544- . option ( '--no-ui' , 'Disable UI enhancements, use plain interface' )
15451515 . action ( async ( options ) => {
15461516 const spaceDir = path . resolve ( options . spaceDir ) ;
15471517 const configPath = path . join ( spaceDir , path . basename ( options . config ) ) ;
@@ -1563,15 +1533,6 @@ space
15631533 console . log ( `Space: ${ pids . spaceName } (${ spaceId } )` ) ;
15641534 console . log ( `Gateway: ${ gatewayUrl } ` ) ;
15651535
1566- // Determine UI mode
1567- const useDebugUI = options . debug || options . simple || options . noUi ;
1568-
1569- // Select appropriate UI module
1570- const InteractiveUI = useDebugUI ? interactiveUI : null ;
1571- const startAdvancedInteractiveUI = useDebugUI
1572- ? null
1573- : advancedInteractiveUI . startAdvancedInteractiveUI ;
1574-
15751536 try {
15761537 // Resolve participant
15771538 const participant = await resolveParticipant ( {
@@ -1613,33 +1574,27 @@ space
16131574 const theme = getTheme ( themeName ) ;
16141575
16151576 // Display banner before starting UI
1616- if ( ! useDebugUI ) {
1617- printBanner ( {
1618- spaceName : pids . spaceName ,
1619- spaceId : spaceId ,
1620- participantId : participant . id ,
1621- gateway : gatewayUrl ,
1622- color : process . env . NO_COLOR !== '1' ,
1623- theme : theme
1624- } ) ;
1625- }
1577+ printBanner ( {
1578+ spaceName : pids . spaceName ,
1579+ spaceId : spaceId ,
1580+ participantId : participant . id ,
1581+ gateway : gatewayUrl ,
1582+ color : process . env . NO_COLOR !== '1' ,
1583+ theme : theme
1584+ } ) ;
16261585
1627- // Start interactive UI
1628- if ( useDebugUI ) {
1629- const ui = new InteractiveUI ( ws , participant . id , spaceId ) ;
1630- ui . start ( ) ;
1631- } else {
1632- // Compute default chat targets from config
1633- const defaultChatTargets = {
1634- participant : Array . isArray ( config ?. participants ?. [ participant . id ] ?. default_to ?. chat )
1635- ? config . participants [ participant . id ] . default_to . chat . slice ( )
1636- : null ,
1637- global : Array . isArray ( config ?. defaults ?. routing ?. default_to ?. chat )
1638- ? config . defaults . routing . default_to . chat . slice ( )
1639- : null
1640- } ;
1641- startAdvancedInteractiveUI ( ws , participant . id , spaceId , themeName , defaultChatTargets ) ;
1642- }
1586+ // Compute default chat targets from config
1587+ const defaultChatTargets = {
1588+ participant : Array . isArray ( config ?. participants ?. [ participant . id ] ?. default_to ?. chat )
1589+ ? config . participants [ participant . id ] . default_to . chat . slice ( )
1590+ : null ,
1591+ global : Array . isArray ( config ?. defaults ?. routing ?. default_to ?. chat )
1592+ ? config . defaults . routing . default_to . chat . slice ( )
1593+ : null
1594+ } ;
1595+
1596+ // Start advanced interactive UI
1597+ advancedInteractiveUI . startAdvancedInteractiveUI ( ws , participant . id , spaceId , themeName , defaultChatTargets ) ;
16431598 } ) ;
16441599
16451600 ws . on ( 'error' , ( err ) => {
0 commit comments