From 64b53c0e1c24492eee4075e56c3ce3c1c58de257 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 13 Dec 2025 20:51:38 +0900 Subject: [PATCH] feat(background-task): improve status output UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove always-zero tool call count from status display - Show last tool only when available - Add status-specific notes: - running: remind no explicit wait needed (system notifies) - error: indicate task failed, check last message 🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode) --- src/tools/background-task/tools.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/tools/background-task/tools.ts b/src/tools/background-task/tools.ts index dabb40f..d9d45a1 100644 --- a/src/tools/background-task/tools.ts +++ b/src/tools/background-task/tools.ts @@ -72,8 +72,8 @@ function formatTaskStatus(task: BackgroundTask): string { const promptPreview = truncateText(task.prompt, 500) let progressSection = "" - if (task.progress) { - progressSection = `\nTool calls: ${task.progress.toolCalls}\nLast tool: ${task.progress.lastTool ?? "N/A"}` + if (task.progress?.lastTool) { + progressSection = `\n| Last tool | ${task.progress.lastTool} |` } let lastMessageSection = "" @@ -91,6 +91,17 @@ ${truncated} \`\`\`` } + let statusNote = "" + if (task.status === "running") { + statusNote = ` + +> **Note**: No need to wait explicitly - the system will notify you when this task completes.` + } else if (task.status === "error") { + statusNote = ` + +> **Failed**: The task encountered an error. Check the last message for details.` + } + return `# Task Status | Field | Value | @@ -101,7 +112,7 @@ ${truncated} | Status | **${task.status}** | | Duration | ${duration} | | Session ID | \`${task.sessionID}\` |${progressSection} - +${statusNote} ## Original Prompt \`\`\`