diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts index 3478aecd..695a3d3c 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts @@ -25,6 +25,7 @@ import crypto from 'crypto'; import path from 'path'; import os from 'os'; import fs from 'fs'; +import { exec } from 'child_process'; export const OUTPUT_UPDATE_INTERVAL_MS = 1000; const MAX_OUTPUT_LENGTH = 10000; @@ -235,6 +236,13 @@ export const useShellCommandProcessor = ( fs.writeFile(outputFilePath, finalOutput, (err) => { if (err) { onDebugMessage(`Failed to write shell output to ${outputFilePath}: ${err.message}`); + } else { + const geminiCommand = `gemini --input ${outputFilePath}`; + exec(geminiCommand, (error) => { + if (error) { + onDebugMessage(`Failed to execute gemini command: ${error.message}`); + } + }); } });