diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index 7717a260..6c1e62f7 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -2924,10 +2924,6 @@ "babysitting": { "type": "object", "properties": { - "enabled": { - "default": false, - "type": "boolean" - }, "timeout_ms": { "default": 120000, "type": "number" diff --git a/src/config/schema.ts b/src/config/schema.ts index 3d33d929..4d4f5fc9 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -313,7 +313,6 @@ export const NotificationConfigSchema = z.object({ }) export const BabysittingConfigSchema = z.object({ - enabled: z.boolean().default(false), timeout_ms: z.number().default(120000), }) diff --git a/src/hooks/unstable-agent-babysitter/index.test.ts b/src/hooks/unstable-agent-babysitter/index.test.ts index a9cc5555..f9900e7d 100644 --- a/src/hooks/unstable-agent-babysitter/index.test.ts +++ b/src/hooks/unstable-agent-babysitter/index.test.ts @@ -76,7 +76,7 @@ describe("unstable-agent-babysitter hook", () => { const backgroundManager = createBackgroundManager([createTask()]) const hook = createUnstableAgentBabysitterHook(ctx, { backgroundManager, - config: { enabled: true, timeout_ms: 120000 }, + config: { timeout_ms: 120000 }, }) // #when @@ -111,7 +111,7 @@ describe("unstable-agent-babysitter hook", () => { ]) const hook = createUnstableAgentBabysitterHook(ctx, { backgroundManager, - config: { enabled: true, timeout_ms: 120000 }, + config: { timeout_ms: 120000 }, }) // #when @@ -139,7 +139,7 @@ describe("unstable-agent-babysitter hook", () => { ]) const hook = createUnstableAgentBabysitterHook(ctx, { backgroundManager, - config: { enabled: true, timeout_ms: 120000 }, + config: { timeout_ms: 120000 }, }) // #when @@ -160,7 +160,7 @@ describe("unstable-agent-babysitter hook", () => { const backgroundManager = createBackgroundManager([createTask()]) const hook = createUnstableAgentBabysitterHook(ctx, { backgroundManager, - config: { enabled: true, timeout_ms: 120000 }, + config: { timeout_ms: 120000 }, }) const now = Date.now() const originalNow = Date.now diff --git a/src/hooks/unstable-agent-babysitter/index.ts b/src/hooks/unstable-agent-babysitter/index.ts index af6844a6..1a8b4057 100644 --- a/src/hooks/unstable-agent-babysitter/index.ts +++ b/src/hooks/unstable-agent-babysitter/index.ts @@ -8,7 +8,6 @@ const COOLDOWN_MS = 5 * 60 * 1000 const THINKING_SUMMARY_MAX_CHARS = 500 type BabysittingConfig = { - enabled?: boolean timeout_ms?: number } @@ -187,7 +186,6 @@ export function createUnstableAgentBabysitterHook(ctx: BabysitterContext, option const eventHandler = async ({ event }: { event: { type: string; properties?: unknown } }) => { if (event.type !== "session.idle") return - if (options.config?.enabled !== true) return const props = event.properties as Record | undefined const sessionID = props?.sessionID as string | undefined diff --git a/src/index.ts b/src/index.ts index cc7e2f5d..89727ae5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -291,9 +291,8 @@ const OhMyOpenCodePlugin: Plugin = async (ctx) => { }) : null; - const unstableAgentBabysitter = - isHookEnabled("unstable-agent-babysitter") && pluginConfig.babysitting?.enabled === true - ? createUnstableAgentBabysitterHook( + const unstableAgentBabysitter = isHookEnabled("unstable-agent-babysitter") + ? createUnstableAgentBabysitterHook( { directory: ctx.directory, client: {