plugin: honor tmux disablement for interactive tmux features

This commit is contained in:
YeonGyu-Kim
2026-04-04 14:14:19 +09:00
parent 2d72f51a92
commit 731c3f1109
5 changed files with 71 additions and 2 deletions
@@ -53,4 +53,30 @@ describe("createSessionHooks", () => {
// then
expect(result.modelFallback).not.toBeNull()
})
it("skips interactive bash session hook when tmux integration is disabled", () => {
// given
const pluginConfig = {
tmux: {
enabled: false,
layout: "main-vertical",
main_pane_size: 60,
main_pane_min_width: 120,
agent_pane_min_width: 40,
isolation: "inline",
},
} as OhMyOpenCodeConfig
// when
const result = createSessionHooks({
ctx: mockContext,
pluginConfig,
modelCacheState: mockModelCacheState,
isHookEnabled: (hookName) => hookName === "interactive-bash-session",
safeHookEnabled: true,
})
// then
expect(result.interactiveBashSession).toBeNull()
})
})