@@ -61,9 +61,7 @@ export type UseGoalContinuationOpts = {
6161 } ) => void
6262}
6363
64- export function useGoalContinuation (
65- opts : UseGoalContinuationOpts ,
66- ) : void {
64+ export function useGoalContinuation ( opts : UseGoalContinuationOpts ) : void {
6765 const optsRef = useRef ( opts )
6866 optsRef . current = opts
6967
@@ -88,7 +86,10 @@ export function useGoalContinuation(
8886
8987 // Codex parity: continuation only after normal completion.
9088 // Aborted turns (Ctrl+C / Escape) must not trigger a new turn.
91- if ( opts . wasAborted ) { hookLog ( 'skip: wasAborted=true' ) ; return }
89+ if ( opts . wasAborted ) {
90+ hookLog ( 'skip: wasAborted=true' )
91+ return
92+ }
9293
9394 // Already enqueued for this idle window
9495 if ( enqueuedRef . current ) return
@@ -102,8 +103,14 @@ export function useGoalContinuation(
102103 hookLog ( 'skip: yielding to queued user messages' )
103104 return
104105 }
105- if ( opts . hasActiveLocalJsxUI ) { hookLog ( 'skip: activeLocalJsxUI' ) ; return }
106- if ( opts . isInPlanMode ) { hookLog ( 'skip: planMode' ) ; return }
106+ if ( opts . hasActiveLocalJsxUI ) {
107+ hookLog ( 'skip: activeLocalJsxUI' )
108+ return
109+ }
110+ if ( opts . isInPlanMode ) {
111+ hookLog ( 'skip: planMode' )
112+ return
113+ }
107114
108115 const goal = getGoal ( )
109116 if ( ! goal ) {
@@ -120,7 +127,9 @@ export function useGoalContinuation(
120127 budgetLimitFiredRef . current = true
121128 enqueuedRef . current = true
122129 const prompt = buildBudgetLimitPrompt ( goal )
123- logForDebugging ( '[goal] hook: budget limit reached, injecting wrap-up prompt' )
130+ logForDebugging (
131+ '[goal] hook: budget limit reached, injecting wrap-up prompt' ,
132+ )
124133 enqueue ( {
125134 value : prompt ,
126135 mode : 'prompt' ,
@@ -157,7 +166,9 @@ export function useGoalContinuation(
157166 persistCurrentGoal ( )
158167
159168 const prompt = buildContinuationPrompt ( goal )
160- logForDebugging ( `[goal] hook: enqueuing turn ${ turns } for "${ goal . objective . slice ( 0 , 60 ) } "` )
169+ logForDebugging (
170+ `[goal] hook: enqueuing turn ${ turns } for "${ goal . objective . slice ( 0 , 60 ) } "` ,
171+ )
161172
162173 enqueue ( {
163174 value : prompt ,
0 commit comments