fix(plugin): honor disabled background-notification hook

This commit is contained in:
Dan Kochetov 2026-02-16 00:58:46 +02:00
parent 5298ff2879
commit 0f287eb1c2
No known key found for this signature in database
2 changed files with 4 additions and 1 deletions

View File

@ -22,8 +22,9 @@ export function createManagers(args: {
pluginConfig: OhMyOpenCodeConfig
tmuxConfig: TmuxConfig
modelCacheState: ModelCacheState
backgroundNotificationHookEnabled: boolean
}): Managers {
const { ctx, pluginConfig, tmuxConfig, modelCacheState } = args
const { ctx, pluginConfig, tmuxConfig, modelCacheState, backgroundNotificationHookEnabled } = args
const tmuxSessionManager = new TmuxSessionManager(ctx, tmuxConfig)
@ -57,6 +58,7 @@ export function createManagers(args: {
log("[index] tmux cleanup error during shutdown:", error)
})
},
enableParentSessionNotifications: backgroundNotificationHookEnabled,
},
)

View File

@ -44,6 +44,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
pluginConfig,
tmuxConfig,
modelCacheState,
backgroundNotificationHookEnabled: isHookEnabled("background-notification"),
})
const toolsResult = await createTools({