Skip to content

Align hooks enable/disable with skills and agents #17685

@sehoon38

Description

@sehoon38

Description

The current implementation of hooks enablement and disablement in the CLI is inconsistent with the patterns established for skills and agents. This alignment was partially addressed in PR #16822 but it was never merged.

Goals

  • Modularize Hook Management: Create hookSettings.ts and hookUtils.ts in packages/cli/src/utils to mirror the structure of skillSettings.ts/skillUtils.ts and agentSettings.ts/agentUtils.ts.
  • Dual-Scope Support: Ensure that enabling a hook clears it from the disabled list in both User and Workspace scopes, and disabling a hook targets the appropriate scope (Workspace if available, otherwise User).
  • Consistent Feedback: Use a shared or mirrored feedback rendering system (similar to renderSkillActionFeedback) to provide clear information about which scopes were modified.
  • Status-Aware Autocompletion: Update /hooks enable to only suggest currently disabled hooks, and /hooks disable to only suggest currently enabled hooks.
  • Support 'All' Operations: Ensure enable-all and disable-all also follow these consistent patterns.

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions