- 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)
23 lines
470 B
TypeScript
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"
|