Skip to content

feat(chat): make status indicators selectable with /tools and /a2a views - #732

Merged
edenreich merged 6 commits into
mainfrom
feat/status-indicator-selection
Jul 3, 2026
Merged

edenreich merged 6 commits into
mainfrom
feat/status-indicator-selection

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Closes #717

What

Makes the status indicators below the chat input keyboard-selectable and gives two of them dedicated views:

  • Press the down arrow from the input to focus the indicator row; left/right cycles through the indicators; Enter opens the matching view; Esc or up returns to the input. The selected indicator renders as a padded reverse-video pill in the accent color.
  • Indicators are labeled for clarity: "Tools: N (mode)" and "A2A: X/Y".
  • New /tools view (also opened via the tools indicator): a read-only, filterable list of the tools available in the current agent mode. Two-line rows (name plus description), word-wrapped descriptions up to two lines with an ellipsis only on overflow, accent selection bar, filter-match underlining, and a "N tools" status line. Multi-line tool descriptions are collapsed to their first meaningful line so embedded usage blocks cannot break the layout.
  • New /a2a view (also opened via the A2A indicator): the registered A2A agents with their connection state.
  • Both views rebuild their items, delegate, and title style on every entry, so agent-mode changes, async MCP tool registration, and theme switches are picked up.

How

  • internal/ui/components/tools_view.go and a2a_view.go reuse the bubbles/v2 list plumbing from the theme selector. The tools view embeds list.DefaultDelegate and overrides only Render to word-wrap the description to the live list width (ansi.Wrap plus ansi.Truncate), keeping the default delegate's styling, filtering, and pagination.
  • Status-bar selection state lives in the chat application model; the indicator row renders the pill via the shared style provider so it follows the active theme.

Testing

  • New unit tests cover indicator selection and cycling, the tools view (items reflect the tool service and agent mode, multi-line descriptions collapse, long descriptions wrap and ellipsize, Esc cancels while Enter does not, Reset rebuilds items), and the A2A view.
  • task build, task test, and task lint all pass.

Docs follow-up

Draft for a docs ticket in inference-gateway/docs, to be filed alongside this PR:

Title: [DOCS] Document status-indicator keyboard selection in the CLI chat

Body: The CLI chat TUI now supports selecting the status indicators below the input (down arrow to focus, left/right to cycle, Enter to open, Esc to return) and adds two views: /tools (read-only, filterable list of the tools available in the current agent mode) and /a2a (registered A2A agents and their connection state). The tools and A2A indicators are labeled "Tools: N (mode)" and "A2A: X/Y". Document the keybindings and both views in the chat interface docs.

Affected pages: CLI chat interface guide, commands/shortcuts reference.

Source: #717 and this PR.

edenreich added 5 commits July 3, 2026 11:22
Pressing arrow down while input-history navigation is idle moves focus
into the status-indicator row below the input; left/right (or tab)
cycle the actionable indicators, enter opens the matching view (model
indicator -> model selection, background-jobs indicator -> task
management), up/esc return to the input, and any other key falls
through so typing continues seamlessly.

Closes #717
- render the selected status indicator as a padded reverse-video pill;
  line wrapping accounts for the extra two columns
- add a read-only, filterable tools list showing the tools available in
  the current agent mode
- open it via the new /tools shortcut or by selecting the tools
  indicator below the input

Refs #717
… view

- rename the status indicators: "🔧 N (T)" becomes "Tools: N (T)" and
  "Agents: X/Y" becomes "A2A: X/Y"
- add a read-only, filterable A2A agents view showing each registered
  agent's readiness, URL, and failure details
- open it via the new /a2a shortcut (registered when A2A is enabled) or
  by selecting the A2A indicator below the input

Refs #717
… layout

Tool descriptions often embed multi-line usage blocks; the hand-rolled
single-line delegate truncated by bytes without stripping newlines, so
rows bled across the screen. Render through a theme-styled
list.DefaultDelegate instead (two-line items, accent selection bar,
ANSI-aware truncation, underlined filter matches) and collapse each
description to its first non-empty line.
Long descriptions were cut to a single truncated line. Wrap them to the
list width at render time instead, showing up to two lines and ending
with an ellipsis only when text still overflows.
@edenreich
edenreich requested a review from a team as a code owner July 3, 2026 09:39
@edenreich
edenreich merged commit 6882de0 into main Jul 3, 2026
1 check passed
@edenreich
edenreich deleted the feat/status-indicator-selection branch July 3, 2026 09:54
inference-gateway-releaser Bot added a commit that referenced this pull request Jul 3, 2026
## [0.128.0](v0.127.0...v0.128.0) (2026-07-03)

### 🚀 Features

* **chat:** make status indicators selectable with /tools and /a2a views ([#732](#732)) ([6882de0](6882de0)), closes [#717](#717) [#717](#717)

### 🐛 Bug Fixes

* **agent:** drop redundant Idle transition that errored on every run ([#726](#726)) ([469ec64](469ec64)), closes [#722](#722) [#725](#725)
* **agent:** report session-cumulative total_turns in completion logs ([#728](#728)) ([0d8fb08](0d8fb08)), closes [#727](#727)
* **a2a:** route active A2A reads and HasPending through the job supervisor ([#693](#693)) ([#721](#721)) ([dcd0670](dcd0670)), closes [#718](#718) [#719](#719) [#720](#720)
* **keybindings:** stop "unknown keybinding action" log flood ([#724](#724)) ([c828426](c828426)), closes [#714](#714) [#722](#722)
* **a2a:** unify background-job liveness, clear, and cancel on the supervisor contract ([#730](#730)) ([eb37fd0](eb37fd0)), closes [#693](#693) [#720](#720) [#718](#718) [#719](#719)
* **logging:** use structured key/value form at misused call sites ([#729](#729)) ([cd96028](cd96028)), closes [#722](#722) [#724](#724) [#724](#724) [#723](#723)
* **tools:** wait for pipe readers before reaping detached bash shells ([#716](#716)) ([e1d0d84](e1d0d84)), closes [#696](#696)

### ⚡ Performance Improvements

* **tui:** cache per-entry rendering and keep the Update loop responsive ([#731](#731)) ([8c9db0d](8c9db0d))

### 📚 Documentation

* **a2a:** add SKILL.md documentation for Agent2Agent protocol ([defcd57](defcd57))

### 🔧 Build System

* **deps:** bump golang.org/x/net from 0.47.0 to 0.55.0 in /examples/mcp/mcp-server ([#715](#715)) ([990803b](990803b))

### 🧹 Maintenance

* **flox:** bump dev deps ([d0c8f6b](d0c8f6b))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.128.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Arrow down lets the user select the status indicator below the input (for example tasks)

1 participant