Files
hurui200320 569d547c56 feat(tui): implement block context menu with 7 actions
Implemented the BlockContextMenu widget as a floating overlay providing
7 keyboard-driven actions for conversation blocks per specification
§ Block Cursor and Context Menu:

- Copy to clipboard (c): Uses pyperclip → OSC 52 → flash fallback chain
- Copy to prompt (p): Returns block text for prompt insertion
- Export as Markdown (e): Writes .md file to current directory
- Export as SVG (v): Renders SVG and opens in default browser
- Maximize/restore (m): Toggles ExpandProtocol blocks (ActorThought,
  ToolCall, DiffView)
- Retry (r): Re-sends preceding prompt for ActorResponse blocks only
- Show raw data (d): Displays raw A2A message data

New modules:
- cleveragents.tui.clipboard: Clipboard utility with 3-strategy fallback
- cleveragents.tui.widgets.block_context_menu: BlockContextMenu widget,
  BlockType enum (10 types), BlockInfo/ActionResult/MenuAction dataclasses,
  ExpandProtocol, and action applicability filtering

41 BDD scenarios across 2 feature files covering all actions, menu
lifecycle, inapplicable action filtering, clipboard fallback chain,
argument validation, export error handling, and XML escaping.

All quality gates pass: lint, typecheck, unit_tests (13026 scenarios),
integration_tests, e2e_tests, coverage_report (97.0%).

ISSUES CLOSED: #999
2026-04-02 08:39:42 +00:00
..
2026-02-20 20:38:53 +00:00