fix(background-cancel): skip notification when user explicitly cancels tasks

- Add skipNotification option to cancelTask method
- Apply skipNotification to background_cancel tool
- Prevents unwanted notifications when user cancels via tool
This commit is contained in:
YeonGyu-Kim
2026-02-03 16:56:40 +09:00
parent 242c63a2fb
commit ce482f82b4
7 changed files with 135 additions and 75 deletions
+2
View File
@@ -642,6 +642,7 @@ export function createBackgroundCancel(manager: BackgroundManager, client: Backg
const cancelled = await manager.cancelTask(task.id, {
source: "background_cancel",
abortSession: originalStatus === "running",
skipNotification: true,
})
if (!cancelled) continue
cancelledInfo.push({
@@ -690,6 +691,7 @@ Only running or pending tasks can be cancelled.`
const cancelled = await manager.cancelTask(task.id, {
source: "background_cancel",
abortSession: task.status === "running",
skipNotification: true,
})
if (!cancelled) {
return `[ERROR] Failed to cancel task: ${task.id}`