feat(windows): native Copilot Chat hook support without WSL#2269
Draft
yc-mattborja wants to merge 1 commit into
Draft
feat(windows): native Copilot Chat hook support without WSL#2269yc-mattborja wants to merge 1 commit into
yc-mattborja wants to merge 1 commit into
Conversation
Add full Windows-native RTK integration for VS Code Copilot Chat's PreToolUse hook mechanism. No WSL, bash, or Unix tools required — the hook is a native Rust binary (rtk hook copilot) that works on any platform via JSON stdin/stdout. Changes: - Fix rtk-rewrite.json: 'rtk hook' -> 'rtk hook copilot' (the hook subcommand requires a target; bare 'rtk hook' exits with usage error) - Add docs/WINDOWS-NATIVE.md: architecture diagram, manual setup, supported commands table, troubleshooting guide - Add scripts/windows-copilot-setup.ps1: automated setup with dynamic version fetching, ripgrep install, ls shim, hook configuration, and integration verification - Update installation.md: replace blanket 'use WSL' with specific guidance (Copilot hook = native, Claude Code shell hook = WSL) Signed-off-by: Matt Borja <matt.borja@yc.edu>
|
|
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
Enables full RTK hook support for VS Code Copilot Chat on native Windows — no WSL, bash, or Unix tools required.
The
PreToolUsehook mechanism (rtk hook copilot) is a native Rust binary communicating via JSON stdin/stdout. It works identically on Windows, Linux, and macOS. This PR documents the Windows-native path, fixes the broken hook config, and provides automated setup tooling.Changes
.github/hooks/rtk-rewrite.json"rtk hook"→"rtk hook copilot"— barertk hookexits code 1 with usage errordocs/WINDOWS-NATIVE.mdscripts/windows-copilot-setup.ps1lsshim, hook config, verification. Fetches latest release dynamically via GitHub API (or accepts-Versionpin)docs/guide/getting-started/installation.mdMotivation
The installation docs say "For full hook support, use WSL instead" — but this only applies to the Claude Code bash shell hook. The VS Code Copilot Chat hook is a completely different mechanism that already works natively. This PR:
copilotsubcommand)lsbinary,rg)Testing
Verified on Windows 11 x64 (no WSL, no Rust toolchain):
19/19 commands intercepted and rewritten — 100% catch rate
4/4 rewritten commands execute successfully on native Windows
Additional notes:
.github/hooks/rtk-rewrite.jsonfunctional (was silently broken)fmt,clippy,test,test-presence) unaffected