Collapsible output sections per type (thinking, command output, tool calls, messages) with colour-coded type indicators
- 主要語言
- Shell
- 星號
- 11.2k
- 分支
- 1.9k
- 平均合併
- 14 小時 16 分鐘
- 30 天內合併 PR
- 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.
貢獻指南
評估
這個 Issue 還沒有評估資料。