Commit Graph

1060 Commits

Author SHA1 Message Date
aesoft 3c8d29a57d Merge pull request #2123 from B-Galati/fix/optional-gh-glab-id
fix(gh,glab): don't pre-reject view/checks/run subcommands missing the id
dev-0.43.0-rc.249
2026-05-29 18:04:02 +02:00
aesoft a9a978c10a Merge pull request #2101 from rtk-ai/fix/copilot-cli-hook-config-schema
feat(copilot): CLI native integration
dev-0.43.0-rc.248
2026-05-29 16:53:41 +02:00
aesoft acfd6c5889 Merge pull request #1048 from ashwingopalsamy/master
fix: prevent crashes when output is piped
dev-0.43.0-rc.247
2026-05-29 13:22:09 +02:00
aesoft 26ff547c25 Update main.rs 2026-05-29 13:15:24 +02:00
aesoft dd5362fd54 Update main.rs 2026-05-29 13:03:02 +02:00
aesoft b11f82751d allow unsafe code clippy + semgrep 2026-05-29 12:57:03 +02:00
aesoft 7853819fe0 Update main.rs 2026-05-29 12:51:04 +02:00
aesoft bcee6cc2ea fix: fmt 2026-05-29 09:26:32 +02:00
aesoft e3ad973617 fix(copilot-cli): use user-level instruction for -g
-g was missing user level instructions which are available for copilot
2026-05-29 09:16:22 +02:00
aesoft b6ecf965a4 missing test tag 2026-05-28 16:50:18 +02:00
aesoft 207c82a585 missing bracket 2026-05-28 16:44:06 +02:00
aesoft 852bcda7ae Merge branch 'develop' into master 2026-05-28 16:42:18 +02:00
aesoft 878af7de99 Merge pull request #2128 from LaraGb/develop
docs(readme): add Portuguese translation
dev-0.43.0-rc.246
2026-05-28 09:00:11 +02:00
Lara f2a2e01e7a docs(readme): add Portuguese translation 2026-05-27 16:00:32 -03:00
Benoit Galati e1bb17f85d fix(gh,glab): don't pre-reject view/checks/run subcommands missing the id
gh and glab both accept several subcommands without an explicit id and
resolve it from the current branch (gh pr view, gh pr checks, glab mr
view) or open an interactive picker (gh run view). RTK was pre-rejecting
with "X number required" before the underlying tool ever ran.

Six call sites now treat the identifier as optional and forward the
request unchanged, letting gh/glab decide:

- gh pr view, gh pr checks, gh issue view, gh run view
- glab mr view, glab issue view

A new `parse_optional_identifier` helper in each file captures the
"(Option<id>, Vec<extra>)" parse so the no-id branch is unit-testable.
format_run_view also drops the dangling `#` from its header when the
run id is empty (interactive-picker passthrough).
2026-05-27 17:47:32 +02:00
Adrien Eppling db483e6c58 fix(hook): omit permissionDecision so Copilot prompts for the rewritten command 2026-05-26 21:26:33 +02:00
Adrien Eppling 6c5e440d83 fix(hook): preserve Copilot CLI toolArgs metadata when rewriting command 2026-05-26 20:50:06 +02:00
Adrien Eppling 69c10b6588 fix(hook): default Copilot CLI rewrite to 'ask' to preserve permission prompts 2026-05-26 20:41:03 +02:00
Adrien Eppling 4b0bbf269b feat(hook): --global Copilot install + transparent rewrite via modifiedArgs 2026-05-26 19:56:04 +02:00
Adrien Eppling 557e57c9f9 fix(hook): semgrep marker + regression tests for Copilot hook isolation 2026-05-26 13:31:20 +02:00
Adrien Eppling 84b703d7d0 feat(hook): wire Copilot into uninstall, telemetry, and discover 2026-05-25 22:19:58 +02:00
Adrien Eppling 8fb29e2f75 fix(hook): emit Copilot CLI-compatible hook config + strip BOM on Windows 2026-05-25 22:19:57 +02:00
aesoft 5a149a7fdb Merge pull request #2092 from rtk-ai/fix/cicd/mit-to-apache
fix(cicd): MIT to Apache 2.0
dev-0.43.0-rc.245
2026-05-25 21:47:15 +02:00
aesoft e132896d3f fix(cicd): MIT to Apache 2.0 2026-05-25 21:42:07 +02:00
Nicolas Le Cam 39f044efd8 fix(hook): collapse bash line continuations before matching (#1572)
Fixes #1564
dev-0.43.0-rc.244
2026-05-25 15:33:51 +02:00
Nicolas Le Cam 3c356b3241 fix: remove remaining noise and rework comments 2026-05-25 15:24:19 +02:00
Nicolas Le Cam 6e76f911d6 fix(ls): preserve permission info as octal when -l/-la is passed (#1675) dev-0.43.0-rc.243 2026-05-25 15:17:15 +02:00
Sai Asish Y 0ec99de8f4 fix(tests): use rewrite_command_no_prefixes in line-continuation tests
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-05-25 06:16:18 -07:00
Sai Asish Y 42ac86ce2f fix(hook): use maintainer regex suggestion for line continuation
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-05-25 06:14:28 -07:00
Nicolas Le Cam 8fcc0dc56c fix: handle GNU --format=long and --format=verbose long args 2026-05-25 14:55:32 +02:00
Nicolas Le Cam 8e04ac4212 fix(grep): parse single-file output containing colons (#1554) dev-0.43.0-rc.242 2026-05-25 14:37:35 +02:00
Nicolas Le Cam 53b5e79561 feat: prefer short args and cleanup comments 2026-05-25 14:12:16 +02:00
Ryan A 6c4dfc727a fix(ls): preserve permission info as octal when -l/-la is passed
Closes #1672

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 12:46:23 +01:00
aesoft 4c099e4b5f Merge pull request #2084 from rtk-ai/fix/docs/mit-to-apache-remaining
fix(docs): replace remaining MIT license references with Apache 2.0
dev-0.42.1-rc.241
2026-05-25 13:38:11 +02:00
Adrien Eppling 9bbc7bb79e fix(docs): replace remaining MIT license references with Apache 2.0 2026-05-25 12:13:43 +02:00
aesoft fa11c6c3eb Merge pull request #2082 from rtk-ai/fix/pkg/MIT-to-apache-2
fix(pkg): rtk is Apache 2.0 and no MIT
dev-0.42.1-rc.240
2026-05-25 10:15:22 +02:00
aesoft 1875945bf3 fix(pkg): rtk is Apache 2.0 and no MIT 2026-05-25 09:42:06 +02:00
SAY-5 2543be5912 fix(hook): collapse bash line continuations before matching (#1564)
Closes #1564.

`rtk hook check` rejected commands that began with a bash line
continuation (`\<NL>`) because the matcher saw the literal `\`
as the first token and bailed out:

    $ rtk hook check $'\\\ngit diff HEAD~1'
    No rewrite for: \\ngit diff HEAD~1

Bash collapses `\<NL>` (and `\<CRLF>`) plus surrounding horizontal
whitespace to a single space before dispatching the command, so
the matcher should do the same. Internal continuations (e.g.
`git diff \<NL>HEAD~1`) are equally common when Claude Code
formats long invocations.

Add a small `collapse_line_continuations` helper that runs a
single regex over the input before `cmd.trim()`. The regex eats
the trailing whitespace on the previous line and the leading
indentation on the next line so the no-double-space invariant
holds. The fast path returns `Cow::Borrowed` when no continuation
is present, so commands without `\<NL>` allocate nothing.

Six regression tests pin: leading \\<NL\>, leading \\<CRLF\>, internal
\\<NL\> between subcommand and args, \\<NL\> followed by indentation,
the no-op fast path, and the helper-level Cow::Borrowed contract.
2026-05-24 20:17:31 -07:00
F0rty-Tw0 0e3a6f4830 fix(grep): NUL-separate file from line:content per review
- rg: switch to `-nH --null` for robust file/content separation
- grep fallback: switch to `-rnHZ` to match rg's --null contract
- Parser regex: `^([^\x00]+)\x00(\d+):(.*)$` so filenames or content
  containing `:digits:` (e.g. `badly_named:52:file.txt`,
  `debug: counter is :42: now`) can no longer fool the parser
- Use `Captures::extract` for cleaner destructuring

Adds tests for the badly-named-filename and digit-colons-in-content
cases; updates existing tests to use NUL-separated fixtures.

Addresses review on #1554.

Signed-off-by: Artiom Tofan <arto@queue-it.com>
2026-05-23 22:57:35 +02:00
F0rty-Tw0 be226d4f1d fix(grep): parse single-file output containing colons
Single-file `rtk grep` returned synthetic `[file] N` buckets when a
matching line contained `:`. ripgrep emits `<line>:<content>` for
single-file searches; the parser used `splitn(3, ':')` length to
disambiguate, which fails when content has `:` (e.g. `Foo::bar(...)`).

Force `--with-filename` on rg (`-H` on the grep fallback) so output is
always `file:line:content`, and replace the inline parser with a
regex-based `parse_match_line` that also handles paths with embedded
`:` (Windows drive letters).

Fixes the parser/rendering portion of #1436. The BRE-translation
portion is addressed in a follow-up PR.

Signed-off-by: Artiom Tofan <arto@queue-it.com>
2026-05-23 22:30:31 +02:00
aesoft 805caf7d06 Merge pull request #1741 from gitbluf/develop
feat(hook): add pi support
dev-0.42.0-rc.237
2026-05-23 10:46:03 +02:00
aesoft 26c88907d9 Merge pull request #2015 from okwn/contrib/rtk/git-log-merge-fix
fix: honor explicit -n N limit for git log on merge commits
dev-0.41.1-rc.236
2026-05-23 10:11:11 +02:00
gitbluf f6a54518bd chore: minor cleanup 2026-05-23 01:58:47 +02:00
gitbluf 8bc8b46384 chore: sync with pi api 2026-05-23 01:57:37 +02:00
gitbluf 9bd6e6f392 feat: address pr suggestions 2026-05-23 01:36:07 +02:00
aesoft 8564ddc79a Merge pull request #2040 from rtk-ai/fix/review-1879-git-status-doc-test
docs(git): sync status README with --porcelain -b
dev-0.41.0-rc.233
2026-05-22 17:56:37 +02:00
Adrien Eppling 6e6efd4dd1 docs(git): sync status README with --porcelain -b (drop -uall) 2026-05-22 17:55:56 +02:00
aesoft f431fb9521 Update git.rs 2026-05-22 15:30:14 +02:00
aesoft 06476d17cb Merge pull request #2035 from rtk-ai/fix/git-status-uall
fix(git): drop -uall from compact status so output never exceeds raw
dev-0.41.0-rc.232
2026-05-22 11:51:53 +02:00
Adrien Eppling 7753e487b3 fix(git): drop -uall from compact status so output never exceeds raw
The compact `git status` path ran `git status --porcelain -b -uall`. The
`-uall` flag expands fully-untracked directories into every file, while raw
`git status` collapses them (e.g. `node_modules/`). This made rtk output
larger than raw — measured ~29x on a 200-file untracked dir (5500B vs 191B) —
violating RTK's compress-or-match-raw invariant and inflating tokens.

Remove `-uall` so untracked directories collapse exactly like raw. This keeps
#991's actual fix intact: all modified/staged/renamed/conflict paths are still
shown with no grouped summaries or `... +N more` overflow markers (`-uall`
never affected those lines). Untracked files in partially-tracked dirs and any
paths git itself expands are still preserved by the formatter.

Measured (rtk vs raw git status):
- node_modules/ (200 files): 5500B (-2780%) -> 25B (+87% savings)
- normal (8 mod + 2 untracked): +71% -> +76%
- 17 modified (#991 case): unchanged at +58%, all 17 shown, 0 overflow markers

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 10:13:00 +02:00