Repository navigation
fix(copilot): support IDE terminal hooks - #3093
Conversation
…ot generated The doc comments described the camelCase toolName/toolArgs schema as "GitHub Copilot CLI"'s format, which was accurate when rtk init --copilot registered it. Now that only the PascalCase schema is generated, this path is reachable only via not-yet-upgraded installs' leftover registration, or hosts that use this schema under a different toolName value on their own (JetBrains/ IntelliJ's Copilot plugin sends "run_in_terminal", tracked in #2443/#3093). Note both call sites accordingly so the code isn't mistaken for dead weight.
|
Heads-up on some overlapping context from #3212 (in review), which also touches
Happy to coordinate further if useful. |
fde0058 to
d0f004f
Compare
|
@KuSh both review points are addressed:
Re-requesting review when you have a moment. |
KuSh
left a comment
There was a problem hiding this comment.
There are a few clippy lints that need addressing before merging
Resolve a semantic (non-textual) merge conflict: develop's 0df6929 changed HookDecision::AskRewrite from a tuple variant AskRewrite(String) to a struct variant AskRewrite { rewritten, explicit }. The auto-merge left two copilot-IDE usages in the old tuple form, breaking the build: - copilot_ide_response_from_decision match arm: bind `rewritten` from the struct variant via `AskRewrite { rewritten, .. }`. - test_copilot_ide_rewrite_returns_deny_with_suggestion: construct the struct variant with `explicit: false` (a default, non-user-configured rewrite; the IDE path ignores the field). Gate green: cargo fmt --all --check, cargo clippy --all-targets --all-features -D warnings, cargo test --all-features (2497 passed). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01G8b9dEaJtpvydzz4ttM7JH
|
@KuSh pushed Fixed by merging
Resolution is folded into the merge commit so it compiles bisect-clean. Local gate green: The new run is stuck at |
|
Quick status check since the last review round: the clippy lints flagged between the
Might be worth a re-review to clear the stale CHANGES_REQUESTED — the blocking issue itself looks fixed. Separate, non-blocking observation while reading through: |
…ot generated The doc comments described the camelCase toolName/toolArgs schema as "GitHub Copilot CLI"'s format, which was accurate when rtk init --copilot registered it. Now that only the PascalCase schema is generated, this path is reachable only via not-yet-upgraded installs' leftover registration, or hosts that use this schema under a different toolName value on their own (JetBrains/ IntelliJ's Copilot plugin sends "run_in_terminal", tracked in #2443/#3093). Note both call sites accordingly so the code isn't mistaken for dead weight.
…ot generated The doc comments described the camelCase toolName/toolArgs schema as "GitHub Copilot CLI"'s format, which was accurate when rtk init --copilot registered it. Now that only the PascalCase schema is generated, this path is reachable only via not-yet-upgraded installs' leftover registration, or hosts that use this schema under a different toolName value on their own (JetBrains/ IntelliJ's Copilot plugin sends "run_in_terminal", tracked in #2443/#3093). Note both call sites accordingly so the code isn't mistaken for dead weight.
…owershell Contributor testing on Windows 11 with Copilot CLI 1.0.73 (#3179) confirmed Copilot CLI remaps its native bash/powershell shell tool to tool_name: "Bash" under the PascalCase PreToolUse schema, and that its updatedInput is honored end-to-end there. Since rtk init --copilot now only registers that schema, Windows already works standalone through it — the camelCase toolName "powershell" case (#3178/#3179) becomes legacy-only, relevant solely to un-upgraded installs. Document that on both HookFormat variants. Also fixes a HookDecision::AskRewrite struct-pattern leftover in copilot_ide_response_from_decision (added by #3093, merged into develop after this branch's own struct-to-tuple AskRewrite refactor), surfaced as a compile error by rebasing onto develop to pick up #3179.
Summary
run_in_terminalpayload separately from Copilot CLIbashmodifiedArgsTesting
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-features(2,499 passed, 8 ignored)Closes #2443