gemini-cli
gemini-cli copied to clipboard
Hooks - Erase Prompt Capability
When a BeforeAgent hook blocks with exit code 2, it currently shows stderr to the user but leaves the prompt visible in UI/history. The design doc suggested an optional erasePrompt field to completely remove the prompt for security scenarios (e.g., detecting secrets in user input).
Code Location:
- BeforeAgent processing: packages/core/src/hooks/hookEventHandler.ts:253-290
- UI integration would be needed in CLI prompt handling