feat: add glab (GitLab CLI) proxy support#854
feat: add glab (GitLab CLI) proxy support#854Smasherr wants to merge 3 commits intortk-ai:developfrom
Conversation
809e088 to
2af7033
Compare
|
|
|
Hey We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes No logic changes — only file moves and import path updates. What you need to doRebase your branch on git fetch origin && git rebase origin/developGit detects renames automatically. If you get import conflicts, update the paths: use crate::git; // now: use crate::cmds::git::git;
use crate::tracking; // now: use crate::core::tracking;
use crate::config; // now: use crate::core::config;
use crate::init; // now: use crate::hooks::init;
use crate::gain; // now: use crate::analytics::gain;Need help rebasing? Tag @aeppling |
Add token-optimized filtering for GitLab CLI (glab) commands: - `glab mr list`: Compact MR listing with state/draft icons (~85% savings) - `glab mr view`: Essential MR details with filtered description (~80% savings) - `glab issue list`: Compact issue listing (~80% savings) - `glab issue view`: Essential issue details (~75% savings) - All other subcommands (api, pipeline, release): passthrough with tracking Follows the established gh_cmd.rs pattern: - JSON output parsing with serde_json - State icons (ultra_compact mode support) - Description filtering (HTML comments, images, horizontal rules) - Identifier extraction for view commands - Graceful fallback to raw command on filter failure - Exit code propagation Includes: - Test fixtures with sanitized data - Unit tests for all filter functions - Token savings assertions (>=60%) - Discover rules for hook rewrite integration Closes rtk-ai#851
Add token-optimized filtering for two more glab subcommand groups: CI/CD pipelines: - `glab ci list`: Compact pipeline listing with status icons (~90% savings) - `glab ci trace`: Strip ANSI codes, section markers, runner boilerplate, git fetch noise, and artifact upload details. Keep commands, build output, warnings, errors, and job result. Releases: - `glab release list`: Passthrough (already compact text output) - `glab release view`: Strip SOURCES block (archive URLs are noise), filter markdown noise (HTML comments, images, horizontal rules) Also: - Add lazy_static regex for CI section markers and bare ANSI codes - Update discover rules pattern and savings estimates - Add test fixtures and unit tests for all new filters
d052aa6 to
af05b14
Compare
Summary
glab) commands, following the establishedgh_cmd.rspatternmr list/view,issue list/view,ci list/trace,release viewwith 40-97% token savingsapi,pipeline, etc.) pass through with usage trackingglab->rtk glab)Closes #851
Coverage
glab mr listglab mr viewglab issue listglab issue viewglab ci listglab ci traceglab release viewglab release listglab api,glab *Test plan
cargo fmt --all && cargo clippy --all-targets && cargo test(1132 passed, 0 failed)rtk glab mr list,rtk glab mr view,rtk glab ci list,rtk glab ci trace,rtk glab release viewoutput inspectedrtk gain --historyconfirms savings: mr list 97%, mr view 93%, ci list 90%, release view 63%rtk rewrite "glab mr list"outputsrtk glab mr list(hook integration works)