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:
@@ -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}`
|
||||
|
||||
Reference in New Issue
Block a user