fix(tasks-hook): 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:
@@ -1,3 +1,4 @@
|
||||
import { isTaskSystemEnabled } from "../../shared/task-system-enabled";
|
||||
import { BLOCKED_TOOLS, REPLACEMENT_MESSAGE } from "./constants";
|
||||
|
||||
export interface TasksTodowriteDisablerConfig {
|
||||
@@ -9,14 +10,14 @@ export interface TasksTodowriteDisablerConfig {
|
||||
export function createTasksTodowriteDisablerHook(
|
||||
config: TasksTodowriteDisablerConfig,
|
||||
) {
|
||||
const isTaskSystemEnabled = config.experimental?.task_system ?? true;
|
||||
const taskSystemEnabled = isTaskSystemEnabled(config);
|
||||
|
||||
return {
|
||||
"tool.execute.before": async (
|
||||
input: { tool: string; sessionID: string; callID: string },
|
||||
_output: { args: Record<string, unknown> },
|
||||
) => {
|
||||
if (!isTaskSystemEnabled) {
|
||||
if (!taskSystemEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user