fix(session-notification): skip notification for subagent sessions (#70)
- Import subagentSessions from claude-code-session-state in both manager.ts and session-notification.ts - Add sessionID to subagentSessions Set when creating background task session - Remove sessionID from subagentSessions when background task session is deleted - Check if session is in subagentSessions before triggering notification Fixes #70: Notification hook no longer triggers for subagent idle events 🤖 Generated with assistance of [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin"
|
||||
import { platform } from "os"
|
||||
import { subagentSessions } from "../features/claude-code-session-state"
|
||||
|
||||
interface Todo {
|
||||
content: string
|
||||
@@ -219,6 +220,8 @@ export function createSessionNotification(
|
||||
const sessionID = props?.sessionID as string | undefined
|
||||
if (!sessionID) return
|
||||
|
||||
if (subagentSessions.has(sessionID)) return
|
||||
|
||||
if (notifiedSessions.has(sessionID)) return
|
||||
if (pendingTimers.has(sessionID)) return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user