Skip to content

Conversation

@blueberrycongee
Copy link

PR Description:

Closes #4730

Summary
Adds intelligent output filtering for /run and /test commands to reduce token usage when command output is very long, while preserving important error information.

Changes
New aider/output_filter.py module:

Smart truncation that keeps head (50 lines) and tail (100 lines) when output exceeds 200 lines
Extracts error-related lines from the truncated middle section with context
Recognizes error patterns across multiple languages (Python, Rust, Go, JavaScript, Java)
Filters common noise patterns (pip downloads, progress bars, etc.)
Updated aider/commands.py:

Integrates output filtering into cmd_run
Shows truncation info in confirmation prompt and output message
New tests/basic/test_output_filter.py:

22 tests covering all filtering functionality

- Add output_filter.py module with smart truncation that preserves error info
- Extract error-related lines from middle section when truncating
- Filter common noise patterns (pip downloads, progress bars, etc.)
- Integrate filtering into cmd_run with user feedback on truncation
- Add comprehensive test coverage (22 tests)
@CLAassistant
Copy link

CLAassistant commented Jan 4, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Intelligent CI/CD Output Filtering for /run and /test Commands

2 participants