some structural simplification

This commit is contained in:
km-anthropic
2025-07-29 14:32:28 -07:00
parent 5bdfd090e0
commit 68e711968d
3 changed files with 17 additions and 20 deletions

View File

@@ -1,6 +1,7 @@
import * as core from "@actions/core";
import { mkdir, writeFile } from "fs/promises";
import type { Mode, ModeOptions, ModeResult } from "../types";
import { isAutomationContext } from "../../github/context";
/**
* Agent mode implementation.
@@ -15,10 +16,7 @@ export const agentMode: Mode = {
shouldTrigger(context) {
// Only trigger for automation events
return (
context.eventName === "workflow_dispatch" ||
context.eventName === "schedule"
);
return isAutomationContext(context);
},
prepareContext(context) {