fix(notification): suppress ready alerts during background tasks
Gate idle ready notifications on the existing background-task continuation marker so cmux does not receive premature ready alerts while delegated work is still active. Constraint: Reuse marker state from background task lifecycle without adding new notification config Rejected: Patch cmux directly | notification readiness belongs upstream in OMO Confidence: high Scope-risk: narrow
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin"
|
||||
import { readContinuationMarker } from "../features/run-continuation-state"
|
||||
import { normalizeSDKResponse } from "../shared"
|
||||
|
||||
interface Todo {
|
||||
@@ -18,3 +19,12 @@ export async function hasIncompleteTodos(ctx: PluginInput, sessionID: string): P
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
export async function hasPendingSessionWork(ctx: PluginInput, sessionID: string): Promise<boolean> {
|
||||
const marker = readContinuationMarker(ctx.directory, sessionID)
|
||||
if (marker?.sources["background-task"]?.state === "active") {
|
||||
return true
|
||||
}
|
||||
|
||||
return hasIncompleteTodos(ctx, sessionID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user