feat: add quiet output mode for destral#182
Conversation
Refs #181 Co-authored-by: Eduard Carreras <ecarreras@gisce.net>
Refs #181 Co-authored-by: Eduard Carreras <ecarreras@gisce.net>
|
Ajuste tras revisión: eliminado el alias |
There was a problem hiding this comment.
Pull request overview
This PR adds an opt-in quiet mode to the destral CLI intended for AI agents/automation, capturing stdout/stderr into a temporary file and only surfacing a short failure summary while keeping default output unchanged when the flag is not used.
Changes:
- Introduces
QuietOutputCapturehelper to redirect stdout/stderr to a temp log and provide a “tail” summary. - Adds a new
--quietCLI flag and wraps the CLI execution to capture output and emit a failure summary / delete logs on success. - Adds unit tests covering basic capture behavior, tail behavior, and cleanup.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
destral/cli.py |
Adds --quiet flag and wraps execution to capture output, emit summaries, and preserve exit codes. |
destral/output.py |
New helper implementing stdout/stderr redirection, tail extraction, and cleanup behavior. |
tests/test_output.py |
New unit tests for the capture helper (disabled mode, capture writes, tail, cleanup). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Eduard Carreras <ecarreras@gisce.net>
|
Revisat el nou review. Estat final:
No hi ha acció pendent sobre la PR. |
Resumen
Añade un modo opt-in
--quietal CLI dedestralpara reducir el ruido de salida cuando lo ejecutan agentes AI o automatizaciones.Por defecto el comportamiento no cambia.
Cambios
QuietOutputCaptureque capturastdout/stderren un fichero temporal.--quiet.Validación
python -m unittest discover testsen Python 2.7 con entorno ERP local.python3 -m unittest tests.test_output.--quietvisible en--help.Closes #181