Skip to content

feat: add Agents tab for browsing AI coding assistants#3

Merged
arimxyer merged 33 commits intomainfrom
feature/agents-tab
Jan 28, 2026
Merged

feat: add Agents tab for browsing AI coding assistants#3
arimxyer merged 33 commits intomainfrom
feature/agents-tab

Conversation

@arimxyer
Copy link
Copy Markdown
Owner

@arimxyer arimxyer commented Jan 26, 2026

Summary

Add a second tab to the TUI for browsing AI coding assistants (Claude Code, Cursor, aider, Windsurf, Goose, Zed).

Features

Core Infrastructure

  • Static agent catalog in data/agents.json with metadata (pricing, categories, providers, platform support)
  • CLI detection that scans PATH and common locations to find installed tools and their versions
  • User config at ~/.config/models/config.toml for tracking preferences

GitHub Integration

  • Live data via gh api: stars, latest versions, changelogs, release dates
  • 1-hour cache to minimize API calls
  • Graceful degradation if GitHub is unavailable

Tab-based UI

  • [/] navigation between Models and Agents tabs
  • Categories panel (All, Installed, CLI Tools, IDEs, Open Source) with counts
  • Agents table showing name, installed version, latest version, stars, and status
  • Rich detail pane with version comparison, badges, and changelog

Picker Modal

  • a key opens add/remove picker
  • Toggle which agents you're tracking
  • Persists to config file

Actions

  • o open docs
  • r open GitHub repo
  • c copy name
  • u copy update command
  • Filters with 1/2/3 keys

Automation

  • gh-aw workflow for weekly data updates from artificialanalysis.ai

New Dependencies

  • semver - Version comparison
  • dirs - Cross-platform config paths
  • toml - Config file parsing

Test Plan

  • cargo test - 8 tests passing
  • cargo clippy -- -D warnings - No warnings
  • Manual testing: run cargo run -- tui, switch tabs, test GitHub data, picker, filters

🤖 Generated with Claude Code

arimxyer and others added 21 commits January 26, 2026 14:44
Design for a second TUI tab to browse AI coding assistants with:
- gh-aw agent for weekly data scraping from artificialanalysis.ai
- GitHub API integration for releases/changelogs (cached, lazy-loaded)
- CLI detection for installed tools with version comparison
- User config persistence at ~/.config/models/config.toml
- Add/remove picker for tracking tools

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Detailed step-by-step plan covering:
- Phase 1: Core infrastructure (deps, data structures, config)
- Phase 2: CLI detection
- Phase 3: TUI tab system
- Phase 4: Agents tab implementation
- Phase 5: Polish and gh-aw workflow

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Add imports for load_agents and Config
- Load agents file and config at startup
- Pass agents_file and config to App::new
- Simplify run_app function

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Replace placeholder functions with full agents tab implementation:
- Categories panel showing All, Installed, CLI Tools, IDEs, Open Source
- Agent list with columns for name, installed version, latest version, status
- Detail panel showing agent name, repo, versions, pricing, providers, categories
- Proper focus highlighting for panels (cyan when focused, gray otherwise)
- Header row with underline styling in agent list
- Selection state management with offset for header row

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add comprehensive event handling for the Agents tab:
- Add new Message variants for agent navigation and actions
- Implement tab-aware key handling (global vs tab-specific keys)
- Support j/k navigation for categories and agents
- Add h/l/Tab focus switching between panels
- Add filter toggles (1/2/3 for installed/cli/open-source)
- Add actions: o=open docs, r=open repo, c=copy name

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@arimxyer arimxyer changed the title feat: add Agents tab for browsing AI coding assistants WIP: feat: add Agents tab for browsing AI coding assistants Jan 26, 2026
arimxyer and others added 8 commits January 26, 2026 16:23
Add GitHubClient that fetches repository stars, issues, license, and release
info using the `gh api` CLI. Includes 1-hour cache TTL to minimize API calls.

- GitHubClient with fetch/fetch_fresh methods
- RepoResponse and ReleaseResponse structs for API parsing
- format_stars() for human-readable star counts (e.g., "12.3k")
- format_relative_time() to extract date from ISO timestamps
- Unit tests for formatting functions

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add GitHubClient integration to the TUI to fetch live GitHub data for agents:
- Add refresh_github_data() method to AgentsApp for bulk fetching
- Add refresh_agent_github() method for single agent refresh
- Add github_client field to App struct
- Call refresh_github_data() on startup in mod.rs

Errors are handled gracefully - GitHub data is optional and failures don't crash the app.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add state fields and methods for the agent add/remove picker modal:
- show_picker, picker_selected, picker_changes fields
- open_picker, close_picker, picker_toggle_current methods
- picker_next, picker_prev, picker_save navigation methods
- Message variants: OpenPicker, ClosePicker, PickerNext, PickerPrev, PickerToggle, PickerSave

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add keybindings to open and interact with the picker modal:
- 'a' to open picker when on Agents tab
- j/k or arrows to navigate picker items
- space to toggle selection
- enter to save and close
- esc to cancel

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Draw a centered popup modal for adding/removing tracked agents.
The modal shows checkboxes with agent name (bold), category (gray),
and installed status. Includes title and keybinding hints in footer.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
arimxyer and others added 4 commits January 26, 2026 16:45
Wire up picker message handlers to call the appropriate AgentsApp methods.
Add config field to App struct to enable picker_save functionality.
Remove #[allow(dead_code)] attributes from picker methods and fields.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add 'u' key in Agents tab to copy the update command for the current
agent to clipboard (e.g., "npm update -g @anthropic-ai/claude-code").

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@arimxyer arimxyer changed the title WIP: feat: add Agents tab for browsing AI coding assistants feat: add Agents tab for browsing AI coding assistants Jan 26, 2026
@arimxyer arimxyer merged commit a5d7856 into main Jan 28, 2026
2 of 3 checks passed
@arimxyer arimxyer deleted the feature/agents-tab branch February 17, 2026 19:00
arimxyer added a commit that referenced this pull request Mar 7, 2026
- Add Model Info section with Creator, Source, Region, Type, Released
- Source colored green (Open) / red (Closed)
- Region and Type use creator category colors from sidebar
- Add medal-colored ranks: gold ★ (#1), silver (#2), bronze (#3)
- Add ★ Wins summary row near top showing per-model win counts
- Pre-compute wins via two-pass to position above metric sections

Co-Authored-By: Claude Opus 4.6 <[email protected]>
arimxyer added a commit that referenced this pull request Mar 20, 2026
Add Focus::Details to the Models tab, allowing users to navigate to the
detail panel with h/l/Tab and scroll its content with j/k/g/G/Ctrl+d/u.

- Add ScrollOffset-based detail_scroll to ModelsApp
- Replace SwitchFocus with directional FocusModelLeft/FocusModelRight
- Refactor draw_model_detail from fixed Layout+Tables to Vec<Line> +
  ScrollablePanel for scrollable, focus-aware rendering
- Reset detail scroll on model change (navigation, sort, filter, search)
- Update style guide: mark known inconsistency #3 as fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
arimxyer added a commit that referenced this pull request Mar 20, 2026
* Models tab: make detail panel navigable and scrollable

Add Focus::Details to the Models tab, allowing users to navigate to the
detail panel with h/l/Tab and scroll its content with j/k/g/G/Ctrl+d/u.

- Add ScrollOffset-based detail_scroll to ModelsApp
- Replace SwitchFocus with directional FocusModelLeft/FocusModelRight
- Refactor draw_model_detail from fixed Layout+Tables to Vec<Line> +
  ScrollablePanel for scrollable, focus-aware rendering
- Reset detail scroll on model change (navigation, sort, filter, search)
- Update style guide: mark known inconsistency #3 as fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* Benchmarks tab: make detail panel navigable and scrollable

Add BenchmarkFocus::Details to the Benchmarks tab, allowing users to
navigate to the detail panel with h/l/Tab and scroll with j/k/g/G/Ctrl+d/u.

- Add ScrollOffset-based detail_scroll to BenchmarksApp
- Replace switch_focus with directional focus_right/focus_left methods
- Refactor draw_benchmark_detail to use ScrollablePanel with focus-aware
  border coloring and scrollbar
- Extract build_benchmark_detail_lines for reuse by detail overlay
- Reset detail scroll on selection change, filter, sort, and rebuild
- Update tests for new directional focus API
- Update style guide: mark known inconsistency #4 as fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* style: fix formatting in models detail render

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
arimxyer added a commit that referenced this pull request Mar 20, 2026
- Add Model Info section with Creator, Source, Region, Type, Released
- Source colored green (Open) / red (Closed)
- Region and Type use creator category colors from sidebar
- Add medal-colored ranks: gold ★ (#1), silver (#2), bronze (#3)
- Add ★ Wins summary row near top showing per-model win counts
- Pre-compute wins via two-pass to position above metric sections

Co-Authored-By: Claude Opus 4.6 <[email protected]>
arimxyer added a commit that referenced this pull request Mar 20, 2026
* Models tab: make detail panel navigable and scrollable

Add Focus::Details to the Models tab, allowing users to navigate to the
detail panel with h/l/Tab and scroll its content with j/k/g/G/Ctrl+d/u.

- Add ScrollOffset-based detail_scroll to ModelsApp
- Replace SwitchFocus with directional FocusModelLeft/FocusModelRight
- Refactor draw_model_detail from fixed Layout+Tables to Vec<Line> +
  ScrollablePanel for scrollable, focus-aware rendering
- Reset detail scroll on model change (navigation, sort, filter, search)
- Update style guide: mark known inconsistency #3 as fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* Benchmarks tab: make detail panel navigable and scrollable

Add BenchmarkFocus::Details to the Benchmarks tab, allowing users to
navigate to the detail panel with h/l/Tab and scroll with j/k/g/G/Ctrl+d/u.

- Add ScrollOffset-based detail_scroll to BenchmarksApp
- Replace switch_focus with directional focus_right/focus_left methods
- Refactor draw_benchmark_detail to use ScrollablePanel with focus-aware
  border coloring and scrollbar
- Extract build_benchmark_detail_lines for reuse by detail overlay
- Reset detail scroll on selection change, filter, sort, and rebuild
- Update tests for new directional focus API
- Update style guide: mark known inconsistency #4 as fixed

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

* style: fix formatting in models detail render

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant