remove hooks experimental and refactor hook Config

This commit is contained in:
DennisYu07 2026-04-01 11:50:23 +08:00
parent 1b1a029fd7
commit 5221002831
33 changed files with 722 additions and 322 deletions

View file

@ -1404,38 +1404,15 @@ const SETTINGS_SCHEMA = {
},
},
hooksConfig: {
type: 'object',
label: 'Hooks Config',
disableAllHooks: {
type: 'boolean',
label: 'Disable All Hooks',
category: 'Advanced',
requiresRestart: false,
default: {},
requiresRestart: true,
default: false,
description:
'Hook configurations for intercepting and customizing agent behavior.',
'Temporarily disable all hooks without deleting configurations. Default is false (hooks enabled).',
showInDialog: false,
properties: {
enabled: {
type: 'boolean',
label: 'Enable Hooks',
category: 'Advanced',
requiresRestart: true,
default: true,
description:
'Canonical toggle for the hooks system. When disabled, no hooks will be executed.',
showInDialog: false,
},
disabled: {
type: 'array',
label: 'Disabled Hooks',
category: 'Advanced',
requiresRestart: false,
default: [] as string[],
description:
'List of hook names (commands) that should be disabled. Hooks in this list will not execute even if configured.',
showInDialog: false,
mergeStrategy: MergeStrategy.UNION,
},
},
},
hooks: {