11import * as React from 'react' ;
22import { Box , Text , Link } from '@anthropic/ink' ;
33import { Select } from '../CustomSelect/select.js' ;
4- import { Dialog } from '../design-system/Dialog.js'
4+ import { Dialog } from '../design-system/Dialog.js' ;
55import { useAppState , useSetAppState } from '../../state/AppState.js' ;
66import { getGlobalConfig , saveGlobalConfig } from '../../utils/config.js' ;
77import { CCR_TERMS_URL } from '../../commands/ultraplan.js' ;
8- import { getPromptIdentifier , getDialogConfig , type PromptIdentifier } from 'src/utils/ultraplan/prompt.js'
8+ import { getPromptIdentifier , getDialogConfig , type PromptIdentifier } from 'src/utils/ultraplan/prompt.js' ;
99
1010// ---------------------------------------------------------------------------
1111// Types
@@ -24,11 +24,11 @@ interface UltraplanLaunchDialogProps {
2424}
2525
2626function dispatchShowTermsLink ( ) {
27- return ! getGlobalConfig ( ) . hasSeenUltraplanTerms
27+ return ! getGlobalConfig ( ) . hasSeenUltraplanTerms ;
2828}
2929
3030function dispatchPromptIdentifier ( ) {
31- return getPromptIdentifier ( )
31+ return getPromptIdentifier ( ) ;
3232}
3333
3434export function UltraplanLaunchDialog ( { onChoice } : UltraplanLaunchDialogProps ) : React . ReactNode {
@@ -40,7 +40,7 @@ export function UltraplanLaunchDialog({ onChoice }: UltraplanLaunchDialogProps):
4040
4141 // Dialog copy derived from the prompt identifier
4242 const dialogConfig = React . useMemo ( ( ) => {
43- return getDialogConfig ( promptIdentifier )
43+ return getDialogConfig ( promptIdentifier ) ;
4444 } , [ promptIdentifier ] )
4545
4646 // Whether the remote-control bridge is currently active
@@ -55,28 +55,28 @@ export function UltraplanLaunchDialog({ onChoice }: UltraplanLaunchDialogProps):
5555 const handleChoice = React . useCallback ( ( value : ChoiceValue ) => {
5656 // If the user chose "run" while the bridge is enabled, disconnect it
5757 // first so the ultraplan session doesn't collide with remote control.
58- const disconnectedBridge = value === 'run' && isBridgeEnabled
58+ const disconnectedBridge = value === 'run' && isBridgeEnabled ;
5959
6060 if ( disconnectedBridge ) {
6161 setAppState ( ( prev ) => {
6262 if ( ! prev . replBridgeEnabled ) {
63- return prev
63+ return prev ;
6464 }
6565 return {
6666 ...prev ,
6767 replBridgeEnabled : false ,
6868 replBridgeExplicit : false ,
6969 replBridgeOutboundOnly : false ,
70- }
71- } )
70+ } ;
71+ } ) ;
7272 }
7373
7474 // Persist that the user has now seen the ultraplan terms
7575 if ( value !== 'cancel' && showTermsLink ) {
76- saveGlobalConfig ( prev => ( prev . hasSeenUltraplanTerms ? prev : { ...prev , hasSeenUltraplanTerms : true } ) )
76+ saveGlobalConfig ( prev => ( prev . hasSeenUltraplanTerms ? prev : { ...prev , hasSeenUltraplanTerms : true } ) ) ;
7777 }
7878
79- onChoice ( value , { disconnectedBridge, promptIdentifier} )
79+ onChoice ( value , { disconnectedBridge, promptIdentifier} ) ;
8080 } ,
8181 [ onChoice , isBridgeEnabled , setAppState , showTermsLink ] ,
8282 )
@@ -96,7 +96,7 @@ export function UltraplanLaunchDialog({ onChoice }: UltraplanLaunchDialogProps):
9696 description : runDescription ,
9797 } ,
9898 { label : 'Not now' , value : 'cancel' as const } ,
99- ]
99+ ] ;
100100
101101 return (
102102 < Dialog
0 commit comments