feat(background-agent): handle "interrupt" in notifications, output, and formatting
Update notification systems to display INTERRUPTED status. Add interrupt handling to background_output tool (terminal status). Add interrupt-specific status note to formatTaskStatus. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { BackgroundTask } from "./types"
|
||||
|
||||
export type BackgroundTaskNotificationStatus = "COMPLETED" | "CANCELLED"
|
||||
export type BackgroundTaskNotificationStatus = "COMPLETED" | "CANCELLED" | "INTERRUPTED"
|
||||
|
||||
export function buildBackgroundTaskNotificationText(input: {
|
||||
task: BackgroundTask
|
||||
|
||||
@@ -9,7 +9,7 @@ export function buildBackgroundTaskNotificationText(args: {
|
||||
}): string {
|
||||
const { task, duration, allComplete, remainingCount, completedTasks } = args
|
||||
const statusText =
|
||||
task.status === "completed" ? "COMPLETED" : task.status === "error" ? "ERROR" : "CANCELLED"
|
||||
task.status === "completed" ? "COMPLETED" : task.status === "interrupt" ? "INTERRUPTED" : task.status === "error" ? "ERROR" : "CANCELLED"
|
||||
const errorInfo = task.error ? `\n**Error:** ${task.error}` : ""
|
||||
|
||||
if (allComplete) {
|
||||
|
||||
Reference in New Issue
Block a user