diff --git a/src/index.ts b/src/index.ts index f493d95cf..a09acb784 100644 --- a/src/index.ts +++ b/src/index.ts @@ -199,10 +199,6 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => { ? createStartWorkHook(ctx) : null; - const atlasHook = isHookEnabled("atlas") - ? createAtlasHook(ctx) - : null; - const prometheusMdOnly = isHookEnabled("prometheus-md-only") ? createPrometheusMdOnlyHook(ctx) : null; @@ -211,6 +207,10 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => { const backgroundManager = new BackgroundManager(ctx); + const atlasHook = isHookEnabled("atlas") + ? createAtlasHook(ctx, { directory: ctx.directory, backgroundManager }) + : null; + initTaskToastManager(ctx.client); const todoContinuationEnforcer = isHookEnabled("todo-continuation-enforcer") @@ -487,6 +487,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => { await directoryReadmeInjector?.["tool.execute.before"]?.(input, output); await rulesInjector?.["tool.execute.before"]?.(input, output); await prometheusMdOnly?.["tool.execute.before"]?.(input, output); + await atlasHook?.["tool.execute.before"]?.(input, output); if (input.tool === "task") { const args = output.args as Record;