Repository navigation
feat(hooks): edit and remove unmanaged Antigravity and Copilot hooks in place - #948
Merged
Merged
Conversation
…in place The "Hooks in targets" dialog could change or remove a hook without importing it only when the Agent keeps hooks as events of one settings file. Antigravity blocks and Copilot hook files had to be imported first, even though both are plain configuration the dialog can address exactly. Candidates now carry the block or file they were read from (source), and NativeEdit uses it: an Antigravity edit replaces or removes the whole named block, keeping enabled: false; a Copilot edit rewrites only the file's hooks key or deletes the file. Both keep the preview diff, the stale-file check, the backup, and the hook stays unmanaged. Code hooks (Pi, Oh My Pi, Amp, OpenCode) still need importing. Dialog rows are keyed by source, so two Copilot files that read as the same hook name (lint.json, skillshare-lint.json) can no longer be removed together. Copilot rows show the file name, the editor names the file, and removal says the file is deleted.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
None. Requested by the maintainer.
What changed
The Hooks in targets dialog could edit or remove a hook without importing it only for Agents that keep hooks as events of one settings file (Claude, Codex, Gemini, Cursor, Qwen, Droid). Antigravity and Copilot rows had no Edit or Remove. Both now do.
source: the Antigravity block name or the Copilot file name they were read from.NativeEdittakes the samesource.enabled: false) stays disabled. A block whose name is not a valid hook name is found by its own name.hookskey, keepingversionand the rest of the file; removing the hook deletes its file. A file Skillshare owns, asourceoutside the hooks folder, a file without ahookskey, and a file whose hooks are empty are refused or not offered.source, so two Copilot files that read as the same hook name (lint.json,skillshare-lint.json) cannot be removed together. Copilot rows are titled by file name, the editor footer names the file, and removal says the file is deleted (hooks.importWillDeleteFile,hooks.importSum.deleteFileHint, all 11 locales).reference/commands/hooks.mdand its ja, ko, zh-Hans, zh-Hant translations describe which hooks can be edited in place.Checks
make checkin a task container: passed.internal/hookstests for edit, remove, restore after each, stale file, project scope, invalid block name, path outside the hooks folder.tsc --noEmit, eslint onsrc/components/hooks.python3 scripts/ai-context.py check: ok.Not run:
pnpm run build, website build (Markdown paragraphs only), screenshots in Clean and dark.Not covered
Checklist
make check) — for code changes