fix(plugin): honor disabled background-notification hook

This commit is contained in:
Dan Kochetov
2026-02-16 00:58:46 +02:00
parent ff10e6b02b
commit aafd2134d2
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -22,8 +22,9 @@ export function createManagers(args: {
pluginConfig: OhMyOpenCodeConfig pluginConfig: OhMyOpenCodeConfig
tmuxConfig: TmuxConfig tmuxConfig: TmuxConfig
modelCacheState: ModelCacheState modelCacheState: ModelCacheState
backgroundNotificationHookEnabled: boolean
}): Managers { }): Managers {
const { ctx, pluginConfig, tmuxConfig, modelCacheState } = args const { ctx, pluginConfig, tmuxConfig, modelCacheState, backgroundNotificationHookEnabled } = args
const tmuxSessionManager = new TmuxSessionManager(ctx, tmuxConfig) const tmuxSessionManager = new TmuxSessionManager(ctx, tmuxConfig)
@@ -57,6 +58,7 @@ export function createManagers(args: {
log("[index] tmux cleanup error during shutdown:", error) log("[index] tmux cleanup error during shutdown:", error)
}) })
}, },
enableParentSessionNotifications: backgroundNotificationHookEnabled,
}, },
) )
+1
View File
@@ -44,6 +44,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
pluginConfig, pluginConfig,
tmuxConfig, tmuxConfig,
modelCacheState, modelCacheState,
backgroundNotificationHookEnabled: isHookEnabled("background-notification"),
}) })
const toolsResult = await createTools({ const toolsResult = await createTools({