What would you like to be added?
Extend the existing @file command functionality to work in non-interactive (piped) mode. Currently, when users input @filename in interactive UI, the file content is automatically read and added to the chat context. This same logic should be implemented for non-interactive mode.
Why is this needed?
In non-interactive cli mode, without direct file reading, Gemini cli needs to first create a tool call request and then read the file, requiring multiple API calls and taking longer to complete.
For example, Claude Code supports: claude -p "explain this code to me @test.js" - completing the task in a single interaction without additional ReadFile tool calls. Gemini CLI should provide the same efficient workflow.
Benefits:
- Performance: Eliminates extra API calls and reduces response time
- Consistency: Unified @file behavior across interactive and non-interactive modes
- Efficiency: Enables single-command workflows for file-based queries
Additional context
No response
What would you like to be added?
Extend the existing @file command functionality to work in non-interactive (piped) mode. Currently, when users input @filename in interactive UI, the file content is automatically read and added to the chat context. This same logic should be implemented for non-interactive mode.
Why is this needed?
In non-interactive cli mode, without direct file reading, Gemini cli needs to first create a tool call request and then read the file, requiring multiple API calls and taking longer to complete.
For example, Claude Code supports: claude -p "explain this code to me @test.js" - completing the task in a single interaction without additional ReadFile tool calls. Gemini CLI should provide the same efficient workflow.
Benefits:
Additional context
No response