Skip to content

Feat/windows winget and hook detection#1504

Open
timeshift92 wants to merge 4 commits intortk-ai:masterfrom
timeshift92:feat/windows-winget-and-hook-detection
Open

Feat/windows winget and hook detection#1504
timeshift92 wants to merge 4 commits intortk-ai:masterfrom
timeshift92:feat/windows-winget-and-hook-detection

Conversation

@timeshift92
Copy link
Copy Markdown

@timeshift92 timeshift92 commented Apr 24, 2026

Summary

  • feat(winget): Add
    tk winget filter for Windows Package Manager — compacts winget list, winget upgrade, winget install output (60-73% token savings)
  • fix(hooks): Fix Windows hook detection — hook_installed_path() now checks .cmd wrapper, parse_hook_version() accepts REM prefix; no more false "No hook installed" warning on Windows
  • fix(hooks): Update .github/hooks/rtk-rewrite.json — command corrected to
    tk hook copilot

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test
  • Manual testing: rtk winget list, rtk winget upgrade, rtk winget install output inspected
  • 10 unit tests for winget filter (token savings ≥60% verified)

Checklist

  • Tests present
  • Breaking change
  • Docs updated — added rtk winget section in README.md and docs/usage/FEATURES.md; updated Windows support table (hook now works natively via .cmd wrapper)

Important: All PRs must target the develop branch (not master).
See CONTRIBUTING.md for details.

Ахмедов Нурбек Медетбаевич added 2 commits April 25, 2026 01:07
- hook_installed_path() now checks rtk-rewrite.cmd as Windows fallback
  when rtk-rewrite.sh is not present
- parse_hook_version() now recognises REM prefix in addition to # prefix
  so Windows .cmd files report the correct version number

Signed-off-by: Ахмедов Нурбек Медетбаевич <n.akhmedov@uzdc.uz>
The hook command was 'rtk hook' (non-existent subcommand).
Fixed to 'rtk hook copilot' which is the correct Copilot preToolUse processor.

Signed-off-by: Ахмедов Нурбек Медетбаевич <n.akhmedov@uzdc.uz>
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ахмедов Нурбек Медетбаевич seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pszymkowiak pszymkowiak added effort-medium 1-2 jours, quelques fichiers enhancement New feature or request labels Apr 24, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

Type feature
🟡 Risk medium

Summary

Adds a new winget (Windows Package Manager) output filter command that strips spinners, separators, progress bars, and license boilerplate from winget subcommands (list, upgrade, install, uninstall, search). Also updates the hook detection command from 'rtk hook' to 'rtk hook copilot'.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

Ахмедов Нурбек Медетбаевич added 2 commits April 25, 2026 01:19
- README.md: add rtk winget commands section under Windows Package Manager
- README.md: update Windows support table — hook now works natively via
  rtk-rewrite.cmd wrapper (hook detection fixed in this PR)
- docs/usage/FEATURES.md: add rtk winget filter section with before/after
  example and token savings table

Signed-off-by: Ахмедов Нурбек Медетбаевич <n.akhmedov@uzdc.uz>
rtk git status -sb was producing 0% savings because args triggered
filter_status_with_args (minimal). Now -s/--short/-b/--branch/-sb/-bs
args are intercepted and routed through format_status_output (same
compact formatter as bare 
tk git status).

fix(winget): passthrough --help/-? flags instead of filtering them

Signed-off-by: Ахмедов Нурбек Медетбаевич <n.akhmedov@uzdc.uz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort-medium 1-2 jours, quelques fichiers enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants