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

@ -79,7 +79,7 @@ export const useAttentionNotifications = ({
// Fire idle_prompt notification hook when entering idle state
if (config && !idleNotificationSentRef.current) {
const messageBus = config.getMessageBus();
const hooksEnabled = config.getEnableHooks();
const hooksEnabled = !config.getDisableAllHooks();
if (hooksEnabled && messageBus) {
fireNotificationHook(
messageBus,

View file

@ -69,7 +69,7 @@ const mockConfig = {
getShellExecutionConfig: () => ({ terminalWidth: 80, terminalHeight: 24 }),
getChatRecordingService: () => undefined,
getMessageBus: vi.fn().mockReturnValue(undefined),
getEnableHooks: vi.fn().mockReturnValue(false),
getDisableAllHooks: vi.fn().mockReturnValue(true),
getHookSystem: vi.fn().mockReturnValue(undefined),
getDebugLogger: vi.fn().mockReturnValue({
debug: vi.fn(),