mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 11:03:44 +00:00
feat(hooks): add tools.ts example hook for interactive tool enable/disable
- /tools command opens SettingsList-based selector for all loaded tools - Space/Enter toggles individual tools between enabled/disabled - Changes apply immediately on toggle (like /settings) - Tool selection persisted to session via appendEntry() - State restored from current branch on session_start, session_tree, session_branch - Uses getBranch() to respect branch-specific tool configuration - Export getSettingsListTheme and getSelectListTheme for hooks to use
This commit is contained in:
parent
ddf8bfceee
commit
892acedb6b
4 changed files with 159 additions and 7 deletions
|
|
@ -17,6 +17,7 @@ cp permission-gate.ts ~/.pi/agent/hooks/
|
|||
| Hook | Description |
|
||||
|------|-------------|
|
||||
| `plan-mode.ts` | Claude Code-style plan mode for read-only exploration with `/plan` command |
|
||||
| `tools.ts` | Interactive `/tools` command to enable/disable tools with session persistence |
|
||||
| `permission-gate.ts` | Prompts for confirmation before dangerous bash commands (rm -rf, sudo, etc.) |
|
||||
| `git-checkpoint.ts` | Creates git stash checkpoints at each turn for code restoration on branch |
|
||||
| `protected-paths.ts` | Blocks writes to protected paths (.env, .git/, node_modules/) |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue