Skip to content

fix: remove project-scope hooks from user settings#44

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
Yong-yuan-X:fix/hooks-remove-user-scope
Jun 25, 2026
Merged

fix: remove project-scope hooks from user settings#44
jeff-r2026 merged 1 commit into
Tencent:mainfrom
Yong-yuan-X:fix/hooks-remove-user-scope

Conversation

@Yong-yuan-X

Copy link
Copy Markdown
Contributor

Summary

Fix teamai hooks remove so it mirrors project-scope hook injection. When project scope injects hooks into both the project directory and the user HOME directory, remove now cleans both locations as well.

This prevents TeamAI hooks from lingering in user-level tool settings after users run teamai hooks remove from a project-scope setup.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature causing existing behavior to change)
  • Documentation only
  • Refactor / internal cleanup

Test Plan

  • .\node_modules\.bin\tsc.cmd --noEmit passes
  • .\node_modules\.bin\vitest.cmd run src/__tests__/hooks-cmd.test.ts passes
  • npm.cmd run build passes
  • Added/updated tests for the change

Notes for Reviewers

Project-scope hook injection already targeted both projectRoot and HOME. This change centralizes the target base-dir resolution and uses it for both inject and remove, so removal no longer leaves user-level TeamAI hooks behind.

@jeff-r2026 jeff-r2026 merged commit 5e9a479 into Tencent:main Jun 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants