github / github/copilot-cli

Surface long-running shell commands in the background tasks UI with live output

未關閉
#2,682 0 則留言 4 個 reaction 已指派 0 人 在 GitHub 檢視
area:terminal-rendering area:tools
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

### Describe the feature or problem you'd like to solve

When the agent runs a long-running shell command (e.g. `dotnet test` on a large test suite that takes 5+ minutes), the user has no visibility into what's happening. The command runs silently in the background and the session appears frozen until it completes. There's no way to inspect intermediate output, check progress, or know if something has gone wrong early.

Meanwhile, Copilot CLI already has a background tasks UI for tracking concurrent work. Long-running shell commands should integrate with this existing infrastructure.

### Proposed solution

When a shell command exceeds a threshold (e.g. 10-30 seconds), automatically promote it to a background task entry visible in the existing background tasks UI. This would allow the user to:

- **See the command** listed as a running background task
- **Inspect live/buffered output** (stdout/stderr) via the background tasks panel
- **Continue chatting** with the agent while the command runs
- **Get notified** when it completes (with exit code and summary)

### Example workflow

1. User: `let's run tests now`
2. Agent runs `dotnet test` in a shell
3. After ~10s, the command appears in the background tasks UI as: `⏳ dotnet test (running — 00:42)`
4. User presses the key to inspect background tasks, selects it, sees live test output scrolling
5. 5 minutes later, task completes: `✅ shell completed (dotnet test ...) elapsed time 5:12`

### Additional context

This is especially valuable for:
- Test suites (`dotnet test`, `npm test`, `pytest`)
- Builds (`dotnet build`, `npm run build`, `cargo build`)
- Any command the agent runs that takes more than a few seconds

The agent already uses sync/async shell modes internally — this is about exposing that to the *user* through the existing background tasks UI so they're not left staring at a blank screen.

貢獻指南

開啟貢獻指南

研究方向

Start by tracing the existing background tasks UI and the agent's sync/async shell modes. Determine how long-running shell commands can be promoted after a threshold while retaining live or buffered stdout/stderr. Done means commands appear with status and elapsed time, remain inspectable while running, support continued chat, and report completion with exit code and summary.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
cli
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。