# Implementation Plan: Discussion Metrics and Compression

## Phase 1: Metrics Visibility
- [x] Task: Update UI for Token Metrics
    - [x] Modify `_render_comms_history_panel` and `render_discussion_entry` in `src/gui_2.py` to extract and prominently display `usage` stats (input, output, cache) from the entry payloads.

## Phase 2: Compression Helper Agent
- [x] Task: Implement Compression Agent
    - [x] Create a new agent definition or function in `src/ai_client.py` (or a dedicated module) capable of receiving a discussion history and a system prompt instructing it to summarize and compact the history.
- [x] Task: Implement UI Triggers
    - [x] Add a "Compress Discussion" button to the Discussion Hub UI.
    - [x] Wire the button to dispatch the compression task to the background executor and display a loading indicator.
    - [x] Upon completion, replace the older entries with the generated summary block.

## Phase 3: Verification
- [x] Task: Verification
    - [x] Verify token metrics are visible per response.
    - [x] Run the "Compress Discussion" tool on a heavy discussion and verify the history is successfully summarized without losing core context.
- [x] Task: Conductor - User Manual Verification 'Phase 3: Verification' (Protocol in workflow.md)