gemini-cli PR fixes whitespace stripping that mangled indentation in @file references
Web4everyone32 · ghdev · 2026-10-26
Community PR #29935 on google-gemini/gemini-cli fixes a bug where attaching files via @file stripped leading/trailing whitespace, so indented code like print("hello") reached the model without its indentation or final newline.
- The fix removes one extra .trim() in readLocalFiles; the existing regex still strips the read-many-files separator wrapper
- Adds 4 regression tests (leading indentation, surrounding blank lines, whitespace-only content, empty file)
- All 85 tests in atCommandProcessor.test.ts pass after the change; no breaking API changes
More from coding & agent
- Sharing memory across Claude, Codex and Cursor: one git repo of Markdown as agent memory — jordimr · 2026-10-26
- Suno-MCP: open-source MCP server lets AI assistants generate music via Suno API — modelcontextprotocol · 2026-10-26
- LangChain explains how it builds targeted evals for Deep Agents — sharpeye_wnl · 2026-10-26
- Pointer: open-source MCP server lets AI agents drive your real Chrome tabs — FinancialManager7861 · 2026-10-26
- Open-source Chowbot MCP server lets you order food via ChatGPT or Claude — saheedniyi_02 · 2026-10-26
- What if all human-written code goes in .gitignore? Redditors debate dev's future role — michal-rd · 2026-10-26