github / github/copilot-cli

Display per-response elapsed time during and after generation

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

描述

## Problem

When Copilot CLI is generating a response, there's no indication of how long it's been running. For short responses this isn't a problem, but for long-running operations (especially in autopilot mode where the agent may work autonomously for minutes at a time), I'd like to know:

- How long has the current response been going?
- How long did the previous response take?

Today, the only signal that "something is happening" is the spinner/animation, which doesn't tell me whether I'm at 5 seconds or 5 minutes.

## Proposed solution

1. **During generation**: display a running elapsed-time counter alongside the spinner.
2. **After completion**: print a short summary line with the total elapsed time for that response.

Example flow:

```
> Refactor the authentication module to use OAuth.

⠋ Working... 0:23
```

Then on completion:
```
✓ Done in 1m 47s.
```

## Why this matters

- **Autopilot mode** especially benefits: when the agent is running unattended for a while, the elapsed counter helps me decide whether to keep waiting or intervene.
- **Performance awareness**: knowing typical response times makes it easy to notice when something is unusually slow (network issue, stuck tool call, etc.).
- **Productivity**: lets me estimate when to context-switch back to a long-running session.

## Reference

Claude Code does this well: during generation it shows a running counter (e.g., `✻ Sautéed for 25s...`), and on completion prints the final elapsed time. Low-visual-noise, useful at a glance.

## Related

#1784 (collapsible real-time session stats panel) covers a broader vision of per-session metrics including duration. This issue is narrower: just the per-response elapsed time, always visible without needing to expand a panel.

貢獻指南

開啟貢獻指南

研究方向

Start by locating the CLI's spinner and response-generation entry points, then trace where generation starts and completes. Add a visible running counter and a completion summary for each response, including autopilot use, and verify both states manually with short and long-running responses.

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

評估

技術堆疊
shell
領域
cli, developer-experience
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

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

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