From 14bf48a6d737ddda334caf00aae91f9fec83aab5 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sun, 5 Apr 2026 13:27:41 +0900 Subject: [PATCH] fix(tmux): conditionally mark server running and add interactive bash helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/create-managers.ts | 4 +++- src/create-runtime-tmux-config.ts | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/create-managers.ts b/src/create-managers.ts index 81023071c..14e8873c4 100644 --- a/src/create-managers.ts +++ b/src/create-managers.ts @@ -28,7 +28,9 @@ export function createManagers(args: { }): Managers { const { ctx, pluginConfig, tmuxConfig, modelCacheState, backgroundNotificationHookEnabled } = args - markServerRunningInProcess() + if (tmuxConfig.enabled) { + markServerRunningInProcess() + } const tmuxSessionManager = new TmuxSessionManager(ctx, tmuxConfig) registerManagerForCleanup({ diff --git a/src/create-runtime-tmux-config.ts b/src/create-runtime-tmux-config.ts index 579cb297e..937fc4b14 100644 --- a/src/create-runtime-tmux-config.ts +++ b/src/create-runtime-tmux-config.ts @@ -7,6 +7,12 @@ export function isTmuxIntegrationEnabled( return pluginConfig.tmux?.enabled ?? false } +export function isInteractiveBashEnabled( + which: (binary: string) => string | null = Bun.which, +): boolean { + return which("tmux") !== null +} + export function createRuntimeTmuxConfig(pluginConfig: { tmux?: OhMyOpenCodeConfig["tmux"] }): TmuxConfig { return TmuxConfigSchema.parse(pluginConfig.tmux ?? {}) }