Files
oh-my-opencode-free-fork/src/hooks/background-notification/index.ts
YeonGyu-Kim 5ba1d9f3c3 refactor(background-notification): remove chat.message handler
- Remove unused chat message notification handler
- Remove formatDuration and formatNotifications helpers
- Simplify to event-only handling
- Remove chat.message hook call from main plugin

Background task notifications now rely on event-based system only.

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
2025-12-13 00:35:34 +09:00

23 lines
470 B
TypeScript

import type { BackgroundManager } from "../../features/background-agent"
interface Event {
type: string
properties?: Record<string, unknown>
}
interface EventInput {
event: Event
}
export function createBackgroundNotificationHook(manager: BackgroundManager) {
const eventHandler = async ({ event }: EventInput) => {
manager.handleEvent(event)
}
return {
event: eventHandler,
}
}
export type { BackgroundNotificationHookConfig } from "./types"