14bf48a6d7
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
19 lines
597 B
TypeScript
19 lines
597 B
TypeScript
import type { OhMyOpenCodeConfig, TmuxConfig } from "./config"
|
|
import { TmuxConfigSchema } from "./config/schema/tmux"
|
|
|
|
export function isTmuxIntegrationEnabled(
|
|
pluginConfig: { tmux?: { enabled?: boolean } | undefined },
|
|
): boolean {
|
|
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 ?? {})
|
|
}
|