github / github/copilot-cli

Collapsible output sections per type (thinking, command output, tool calls, messages) with colour-coded type indicators

オープン
#1,787 コメント 2 件 リアクション 4 件 担当者 0 名 GitHub で見る
area:terminal-rendering
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

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

During a complex agent session, the scrollback fills up rapidly with a mix of very different content types — reasoning/thinking blocks, tool/command output, background task results, and the agent's final message. These are all rendered as a flat, undifferentiated stream. There is no way to collapse a 200-line command output you've already read, fold away a long thinking block, or visually distinguish at a glance what type of content each section is. Navigating a long session becomes increasingly unwieldy as output accumulates.

### Proposed solution

Make each discrete output section independently collapsible, with colour-coded type indicators so the nature of each block is immediately recognisable.

**Collapsible sections — toggle individually or all at once:**

| Section type | Collapse behaviour |
|---|---|
| 💭 **Thinking / reasoning** | Fold to a single summary line (e.g. `💭 Thinking [~340 tokens] ▶ expand`) |
| ⚙ **Tool call / command output** | Fold to tool name + exit code (e.g. `⚙ pwsh ✔ ▶ expand`) |
| 🤖 **Background / worker task** | Fold to agent type + status (e.g. `🤖 explore ✔ done ▶ expand`) |
| 💬 **Agent message** | Collapsible but shown expanded by default |

**Keyboard controls:**
- `←` / `→` (or `z`) on a focused section — collapse / expand that section
- `Ctrl+←` / `Ctrl+→` — collapse / expand **all** sections of that type at once
- `Ctrl+Shift+←` — collapse **everything** in the scrollback (clean slate view)
- `Ctrl+Shift+→` — expand everything

**Colour-coded leading indicators** (respects terminal theme / AUTO palette):

```
💭 [dim purple] Thinking
⚙ [dim yellow] Tool call / command
🤖 [dim cyan] Background task / worker agent
💬 [white] Agent message
✖ [red] Error / failure
```

Collapsed sections render as a single muted line with a `▶` expand arrow. Expanded sections show the `▼` arrow. Users who prefer a minimal UI can set `"collapsibleOutput": false` in `config.json` to revert to the current flat rendering.

### Example prompts or workflows

1. Agent produces a 300-line `npm test` output. User reads it, then collapses it with `←` — one line remains, scrollback is clean.
2. User wants to hide all thinking blocks for the session — `Ctrl+←` on any thinking block collapses every thinking section at once.
3. User glances at the colour indicators to quickly scan which turns involved tool calls vs. pure reasoning vs. final answers — without reading a single word.
4. User runs `Ctrl+Shift+←` to collapse all output after a long session, then selectively re-expands only the sections they want to revisit.
5. User disables the feature entirely via config — output renders exactly as it does today.

### Additional context

- OS: Windows 11 Pro (Build 26200 / 24H2)
- Shell: PowerShell 7.5.4
- Copilot CLI: 0.0.420 (win32-x64)
- Thinking blocks are already visually separated in some form in the current UI — this extends that into full interactivity.
- The colour indicator system should integrate with the existing `AUTO` theme so colours adapt correctly to any terminal colour scheme.
- This is a significant UX improvement for long or complex sessions where the scrollback becomes the primary navigation challenge.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

The issue names no files, tests, or entry points. Start by mapping the existing terminal output rendering, section focus and keyboard handling, and AUTO theme behavior; done means independently collapsible output types, bulk controls, color indicators, and the documented configuration fallback all work together.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
cli, design
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。