feat: add -s/--silent to suppress the runner's own output#429
Conversation
## Summary - Add `-s, --silent` to `run` (mutually exclusive with `--verbose`), matching the `--silent` flag in npm/pnpm/yarn/bun. - Silent runs emit only the tasks' own stdout/stderr — the per-task command line, the inline cache-status indicator, inter-task spacing, the grouped-mode block header, and the run summary are all suppressed. Error banners and the process exit code are unaffected. - The summary is still computed and persisted, so `--last-details` keeps working after a silent run. Useful in agentic verification gates, where the command line and cache/summary diagnostics are pure noise that waste tokens when replayed on every run. Addresses voidzero-dev/vite-plus#1768. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
vite-task/crates/vite_task/src/session/reporter/labeled/mod.rs
Lines 120 to 123 in ea2f983
When --silent is combined with --log labeled, stdout is still wrapped in LabeledWriter with the [pkg#task] prefix, so the command no longer leaves only the task's raw output. This breaks the main use case for silent mode when callers pipe stdout or have a default labeled log mode, because vp run --silent --log labeled build emits prefixed task lines even though the new flag suppresses the other runner chrome; use an unprefixed writer when self.silent is true.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
-s, --silenttorun(mutually exclusive with--verbose), matching the--silentflag in npm/pnpm/yarn/bun.--last-detailskeeps working after a silent run.Useful in agentic verification gates, where the command line and cache/summary diagnostics are pure noise that waste tokens when replayed on every run.
Addresses voidzero-dev/vite-plus#1768.