fix(tool-registry): use interactive bash availability for tool registration
🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -5,7 +5,7 @@ import type {
|
||||
AvailableCategory,
|
||||
} from "../agents/dynamic-agent-prompt-builder"
|
||||
import type { OhMyOpenCodeConfig } from "../config"
|
||||
import { isTmuxIntegrationEnabled } from "../create-runtime-tmux-config"
|
||||
import { isInteractiveBashEnabled } from "../create-runtime-tmux-config"
|
||||
import type { PluginContext, ToolsRecord } from "./types"
|
||||
|
||||
import {
|
||||
@@ -104,10 +104,16 @@ export function createToolRegistry(args: {
|
||||
managers: Pick<Managers, "backgroundManager" | "tmuxSessionManager" | "skillMcpManager">
|
||||
skillContext: SkillContext
|
||||
availableCategories: AvailableCategory[]
|
||||
interactiveBashEnabled?: boolean
|
||||
}): ToolRegistryResult {
|
||||
const { ctx, pluginConfig, managers, skillContext, availableCategories } = args
|
||||
const tmuxIntegrationEnabled = isTmuxIntegrationEnabled(pluginConfig)
|
||||
|
||||
const {
|
||||
ctx,
|
||||
pluginConfig,
|
||||
managers,
|
||||
skillContext,
|
||||
availableCategories,
|
||||
interactiveBashEnabled = isInteractiveBashEnabled(),
|
||||
} = args
|
||||
const backgroundTools = createBackgroundTools(managers.backgroundManager, ctx.client)
|
||||
const callOmoAgent = createCallOmoAgent(
|
||||
ctx,
|
||||
@@ -204,7 +210,7 @@ export function createToolRegistry(args: {
|
||||
task: delegateTask,
|
||||
skill_mcp: skillMcpTool,
|
||||
skill: skillTool,
|
||||
...(tmuxIntegrationEnabled ? { interactive_bash } : {}),
|
||||
...(interactiveBashEnabled ? { interactive_bash } : {}),
|
||||
...taskToolsRecord,
|
||||
...hashlineToolsRecord,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user