Commit 2af7033
committed
feat: add glab (GitLab CLI) proxy support
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 #8511 parent a00560a commit 2af7033
5 files changed
Lines changed: 1145 additions & 0 deletions
File tree
- src
- discover
- tests/fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
113 | 122 | | |
114 | 123 | | |
115 | 124 | | |
| |||
0 commit comments