feat: add context, watch, dedup output filtering commands#553
Open
bz00qa wants to merge 2 commits intortk-ai:developfrom
Open
feat: add context, watch, dedup output filtering commands#553bz00qa wants to merge 2 commits intortk-ai:developfrom
bz00qa wants to merge 2 commits intortk-ai:developfrom
Conversation
5 tasks
4 tasks
New commands: - `rtk context`: combined git status + diff + log in one call with session dedup (prints one-liner if output unchanged since last call) - `rtk watch <cmd>`: runs command and shows only what changed since last run (resolved/new lines), great for iterative test workflows - `rtk dedup [cmd]`: deduplicate noisy command output (compile lines, npm warnings, pip satisfied, progress bars) — reads from stdin or runs command - `rtk watch-clear`: reset watch diff history Infrastructure: - dedup.rs: 20+ noise pattern regexes (Cargo, npm, pip, Go, Vite, progress bars) with consecutive-line collapsing and identical-line dedup - auto_filter.rs: multi-stage filter pipeline (ANSI strip → CR overwrite strip → decorative separator strip → noise dedup → identical dedup → smart truncate with head+tail preservation) - `rtk proxy -f`: new --filter flag applies auto_filter pipeline to proxy output for generic noise reduction 27 new tests across all modules. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: bz00qa <bz00qa.hub@gmail.com>
70b9a54 to
8539b94
Compare
bz00qa
added a commit
to bz00qa/rtk_fork
that referenced
this pull request
Mar 13, 2026
…docs and tests Remove scope creep from PR rtk-ai#550: - Restore rules.rs/registry.rs to develop baseline, keep only in-scope changes - Remove strip_verbose_flags(), proxy -f routing, expanded subcommands - Remove bun/deno/bunx from COMMAND_REGISTRY (unmerged PR rtk-ai#548) - Remove context/watch/dedup from COMMAND_REGISTRY (non-existent PR rtk-ai#553) - Remove detect_patterns() and normalize_cmd_base() (deferred) - Remove PatternOpportunity from report Add missing tests: consumer_base(), effective_idx Add docs: CHANGELOG.md, README.md gain section, ARCHITECTURE.md discover module Fix clippy warnings in new test code (vec![] → array, single_match) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Carve out the proxy --filter enhancement to keep this PR focused on the new context, watch, and dedup commands. The auto_filter module was only used by proxy --filter and is removed entirely. Add CHANGELOG.md and README.md documentation for the new commands. Signed-off-by: bZ00qa <167500396+bz00qa@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
This PR has merge conflicts with git fetch upstream develop
git rebase upstream/develop
git push --force-with-leaseLabeling |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rtk context: Combined git status + diff + log in a single call with session dedup — prints one-liner if output unchanged since last call, reducing round-trip overhead for LLMsrtk watch <cmd>: Runs command and shows only changed lines since last run (resolved/new), ideal for iterative test-fix workflowsrtk dedup [cmd]: Deduplicates noisy output (compile lines, npm warnings, pip satisfied, progress bars) — reads from stdin or runs command directlyrtk watch-clear: Resets watch diff historyrtk proxy -f: New--filterflag applies auto-filter pipeline to proxy output for generic noise reductionInfrastructure
dedup.rs: 20+ noise pattern regexes covering Cargo, npm/pnpm, pip, Go, Vite/Webpack/Turbo, progress bars/spinners with consecutive-line collapsing and identical-line dedupauto_filter.rs: Multi-stage filter pipeline — ANSI strip → CR overwrite strip → decorative separator strip → noise dedup → identical dedup → smart truncate (head+tail preservation, skip truncation on failure to preserve error context)Tests
27 new tests across all modules covering edge cases, token savings verification, and diff computation.
Test plan
cargo fmt --allpassescargo clippy --all-targetspasses (no new warnings)cargo test— 914 passed, 27 new tests all greenrtk contextin a git repo shows combined status/diff/logrtk watch cargo testshows full output first run, diff on subsequent runsrtk dedupwith piped build output collapses noise linesrtk proxy -f <cmd>applies auto-filter to output🤖 Generated with Claude Code