fix(tool-config): share task_system resolution
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -218,6 +218,16 @@ describe("applyToolConfig", () => {
|
||||
|
||||
describe("#given task_system is undefined", () => {
|
||||
describe("#when applying tool config", () => {
|
||||
it("#then should not disable todo tools globally by default", () => {
|
||||
const params = createParams({})
|
||||
|
||||
applyToolConfig(params)
|
||||
|
||||
const tools = params.config.tools as Record<string, unknown>
|
||||
expect(tools.todowrite).toBeUndefined()
|
||||
expect(tools.todoread).toBeUndefined()
|
||||
})
|
||||
|
||||
it.each([
|
||||
"atlas",
|
||||
"sisyphus",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { OhMyOpenCodeConfig } from "../config";
|
||||
import { getAgentDisplayName, getAgentListDisplayName } from "../shared/agent-display-names";
|
||||
import { isTaskSystemEnabled } from "../shared/task-system-enabled";
|
||||
|
||||
type AgentWithPermission = { permission?: Record<string, unknown> };
|
||||
|
||||
@@ -25,7 +26,7 @@ export function applyToolConfig(params: {
|
||||
pluginConfig: OhMyOpenCodeConfig;
|
||||
agentResult: Record<string, unknown>;
|
||||
}): void {
|
||||
const taskSystemEnabled = params.pluginConfig.experimental?.task_system ?? false
|
||||
const taskSystemEnabled = isTaskSystemEnabled(params.pluginConfig)
|
||||
const denyTodoTools = taskSystemEnabled
|
||||
? { todowrite: "deny", todoread: "deny" }
|
||||
: {}
|
||||
|
||||
Reference in New Issue
Block a user