@@ -65,16 +65,8 @@ function isMcpRuntimeForTestResult(): boolean {
6565 return process . env . XCODEBUILDMCP_RUNTIME === 'mcp' ;
6666}
6767
68- function outputStyleForTestResult ( ) : OutputStyle {
69- return isMcpRuntimeForTestResult ( ) ? 'minimal' : 'normal' ;
70- }
71-
72- function nextStepsRuntimeForTestResult ( ) : 'cli' | 'mcp' {
73- return isMcpRuntimeForTestResult ( ) ? 'mcp' : 'cli' ;
74- }
75-
7668function sessionToTestResult ( session : ReturnType < typeof createRenderSession > ) : ToolTestResult {
77- const outputStyle = outputStyleForTestResult ( ) ;
69+ const outputStyle : OutputStyle = isMcpRuntimeForTestResult ( ) ? 'minimal' : 'normal' ;
7870 const text = renderCliTextTranscript ( {
7971 items : [ ] ,
8072 structuredOutput : session . getStructuredOutput ?.( ) ,
@@ -130,7 +122,7 @@ function createValidatedHandler<TParams, TContext>(
130122 session ! . setStructuredOutput ?.( ctx . structuredOutput ) ;
131123 }
132124 if ( ctx . nextSteps && ctx . nextSteps . length > 0 ) {
133- session ! . setNextSteps ?.( [ ...ctx . nextSteps ] , nextStepsRuntimeForTestResult ( ) ) ;
125+ session ! . setNextSteps ?.( [ ...ctx . nextSteps ] , isMcpRuntimeForTestResult ( ) ? 'mcp' : 'cli' ) ;
134126 }
135127 return sessionToTestResult ( session ! ) ;
136128 }
@@ -279,7 +271,7 @@ function createSessionAwareHandler<TParams, TContext>(opts: {
279271 session ! . setStructuredOutput ?.( ctx . structuredOutput ) ;
280272 }
281273 if ( ctx . nextSteps && ctx . nextSteps . length > 0 ) {
282- session ! . setNextSteps ?.( [ ...ctx . nextSteps ] , nextStepsRuntimeForTestResult ( ) ) ;
274+ session ! . setNextSteps ?.( [ ...ctx . nextSteps ] , isMcpRuntimeForTestResult ( ) ? 'mcp' : 'cli' ) ;
283275 }
284276 return sessionToTestResult ( session ! ) ;
285277 }
0 commit comments