@@ -136,19 +136,18 @@ export const geminiDetectionSpec: DetectionSpec = {
136136 // Bypass Gemini's folder-trust check during the probe so the AgentRegistry
137137 // doesn't emit "Skipping project agents..." onto stdout, which can collide
138138 // with JSON-RPC frames and break the ACP parser.
139- const trustEnv = { GEMINI_CLI_TRUST_WORKSPACE : "true" } ;
139+ const probeArgs = [ "--acp" , "--skip-trust" ] ;
140140 const probeCmd =
141141 ctx . location . kind === "wsl"
142- ? buildAgentCommand ( ctx . location , "gemini" , [ "--acp" ] , ctx . executablePath , trustEnv )
143- : buildAgentCommand ( ctx . location , ctx . executablePath , [ "--acp" ] ) ;
142+ ? buildAgentCommand ( ctx . location , "gemini" , probeArgs , ctx . executablePath )
143+ : buildAgentCommand ( ctx . location , ctx . executablePath , probeArgs ) ;
144144 const probeCwd = ctx . location . kind === "wsl" ? "/tmp" : homedir ( ) ;
145145 const probeResult = await probeAcpCapabilities ( probeCmd . command , probeCmd . args , probeCwd , {
146146 timeoutMs : 15_000 ,
147147 label :
148148 ctx . location . kind === "wsl"
149149 ? `gemini:wsl:${ ctx . location . distro } `
150150 : `gemini:${ ctx . location . kind } ` ,
151- ...( ctx . location . kind === "wsl" ? { } : { env : trustEnv } ) ,
152151 } ) ;
153152 if ( ! probeResult ) return undefined ;
154153 const modelTokens = new Map < string , number > ( ) ;
0 commit comments