Revert "implementation 10 hooks"

This reverts commit c9126e043f.
This commit is contained in:
DennisYu07 2026-03-01 17:58:11 -08:00
parent c9126e043f
commit 4b18cfe3f3
13 changed files with 19 additions and 3296 deletions

View file

@ -1220,116 +1220,6 @@ const SETTINGS_SCHEMA = {
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
PreToolUse: {
type: 'array',
label: 'PreToolUse Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute before tool execution. Can inspect, modify, or block tool execution.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
PostToolUse: {
type: 'array',
label: 'PostToolUse Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute after successful tool execution. Can process results or add context.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
PostToolUseFailure: {
type: 'array',
label: 'PostToolUseFailure Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute when tool execution fails. Can handle errors or provide recovery suggestions.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
Notification: {
type: 'array',
label: 'Notification Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute when notifications are generated. For side effects only (e.g., logging, forwarding).',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
SessionStart: {
type: 'array',
label: 'SessionStart Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute when a new session starts or is resumed. Can load environment variables, set context, or load existing issues.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
SessionEnd: {
type: 'array',
label: 'SessionEnd Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute when a session is ending. Can perform cleanup tasks, log session statistics, or save session state.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
PreCompact: {
type: 'array',
label: 'PreCompact Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute before context compaction. Can log pre-compaction state, prepare compaction parameters, or perform cleanup tasks.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
SubagentStart: {
type: 'array',
label: 'SubagentStart Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute when a subagent (Task tool call) is started. Can inject additional context, security guidelines, or configuration.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
SubagentStop: {
type: 'array',
label: 'SubagentStop Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute right before a subagent concludes its response. Can validate subagent results, log completion events, or provide post-execution feedback.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
PermissionRequest: {
type: 'array',
label: 'PermissionRequest Hooks',
category: 'Advanced',
requiresRestart: false,
default: [],
description:
'Hooks that execute when a permission dialog is displayed. Can auto-approve or deny permission requests, modify tool input, or apply permission rules.',
showInDialog: false,
mergeStrategy: MergeStrategy.CONCAT,
},
},
},