refactor(plugin): remove metadata assertions

Guard optional plugin metadata and pane identifiers before passing them to cleanup and warning paths.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-05-15 16:31:13 +09:00
parent 0a3d1875f7
commit a9886ccbb7
4 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -101,8 +101,8 @@ export function createSessionHooks(args: {
if (isHookEnabled("session-notification")) {
const forceEnable = pluginConfig.notification?.force_enable ?? false
const externalNotifier = detectExternalNotificationPlugin(ctx.directory)
if (externalNotifier.detected && !forceEnable) {
log(getNotificationConflictWarning(externalNotifier.pluginName!))
if (externalNotifier.detected && externalNotifier.pluginName && !forceEnable) {
log(getNotificationConflictWarning(externalNotifier.pluginName))
} else {
sessionNotification = safeHook("session-notification", () => createSessionNotification(ctx))
}