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:
YeonGyu-Kim
2025-12-16 23:01:48 +09:00
parent ecc8ade4bc
commit b984bfd9f3
2 changed files with 6 additions and 0 deletions

View File

@@ -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