fix(atlas): register tool.execute.before and pass backgroundManager
- Add atlasHook?.['tool.execute.before'] call in tool.execute.before handler - Pass backgroundManager option to createAtlasHook for proper bg task checking - Move atlasHook declaration after backgroundManager initialization
This commit is contained in:
parent
e16bbbcc05
commit
75158caded
@ -199,10 +199,6 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
|||||||
? createStartWorkHook(ctx)
|
? createStartWorkHook(ctx)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
const atlasHook = isHookEnabled("atlas")
|
|
||||||
? createAtlasHook(ctx)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
const prometheusMdOnly = isHookEnabled("prometheus-md-only")
|
const prometheusMdOnly = isHookEnabled("prometheus-md-only")
|
||||||
? createPrometheusMdOnlyHook(ctx)
|
? createPrometheusMdOnlyHook(ctx)
|
||||||
: null;
|
: null;
|
||||||
@ -211,6 +207,10 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
|||||||
|
|
||||||
const backgroundManager = new BackgroundManager(ctx);
|
const backgroundManager = new BackgroundManager(ctx);
|
||||||
|
|
||||||
|
const atlasHook = isHookEnabled("atlas")
|
||||||
|
? createAtlasHook(ctx, { directory: ctx.directory, backgroundManager })
|
||||||
|
: null;
|
||||||
|
|
||||||
initTaskToastManager(ctx.client);
|
initTaskToastManager(ctx.client);
|
||||||
|
|
||||||
const todoContinuationEnforcer = isHookEnabled("todo-continuation-enforcer")
|
const todoContinuationEnforcer = isHookEnabled("todo-continuation-enforcer")
|
||||||
@ -487,6 +487,7 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
|||||||
await directoryReadmeInjector?.["tool.execute.before"]?.(input, output);
|
await directoryReadmeInjector?.["tool.execute.before"]?.(input, output);
|
||||||
await rulesInjector?.["tool.execute.before"]?.(input, output);
|
await rulesInjector?.["tool.execute.before"]?.(input, output);
|
||||||
await prometheusMdOnly?.["tool.execute.before"]?.(input, output);
|
await prometheusMdOnly?.["tool.execute.before"]?.(input, output);
|
||||||
|
await atlasHook?.["tool.execute.before"]?.(input, output);
|
||||||
|
|
||||||
if (input.tool === "task") {
|
if (input.tool === "task") {
|
||||||
const args = output.args as Record<string, unknown>;
|
const args = output.args as Record<string, unknown>;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user