[PR #563] [MERGED] Update Models Dialog to Single List with Recently Used #9647

Closed
opened 2026-02-16 18:13:55 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/563
Author: @timoclsn
Created: 6/30/2025
Status: Merged
Merged: 7/1/2025
Merged by: @adamdotdevin

Base: devHead: update-models-dialog


📝 Commits (9)

  • 7f1a078 Update models dialog to use one sorted list
  • 2d101a8 Merge branch 'dev' into update-models-dialog
  • e2acfc9 Add width calculation and display 10 models
  • cef0f85 Add model list element background handling
  • 7660239 fix(tui): auto-select second model in dialog list on setup
  • 49ed871 Remove comments
  • 8012c2b fix(tui): simplify release date parsing in dialog models
  • 19a5697 fix(tui): auto-select first model in dialog list when available
  • 8a40331 fix(tui): remove unnecessary comments in UpdateModelUsage function

📊 Changes

3 files changed (+212 additions, -127 deletions)

View changed files

📝 packages/tui/internal/components/dialog/models.go (+170 -123)
📝 packages/tui/internal/config/config.go (+41 -4)
📝 packages/tui/internal/tui/tui.go (+1 -0)

📄 Description

This PR reworks the models dialog as suggested in #541:

  • No pages anymore, just a single list.
  • Models are sorted by recent usage, so the most used models are at the top.
  • Unused models should be sorted by release date.
  • Increased the displayed models to 10.
  • Dialog width is dynamically calculated by the longest model/provider name to prevent wrapping.
  • Model name is in normal text color, provider in muted text color.

Bildschirmfoto 2025-06-30 um 21 21 12


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/563 **Author:** [@timoclsn](https://github.com/timoclsn) **Created:** 6/30/2025 **Status:** ✅ Merged **Merged:** 7/1/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `update-models-dialog` --- ### 📝 Commits (9) - [`7f1a078`](https://github.com/anomalyco/opencode/commit/7f1a078a2468c7dbe840efee4e74fef7ded8ac33) Update models dialog to use one sorted list - [`2d101a8`](https://github.com/anomalyco/opencode/commit/2d101a8c6aa9834e36acdca7692c0508f495713a) Merge branch 'dev' into update-models-dialog - [`e2acfc9`](https://github.com/anomalyco/opencode/commit/e2acfc9adb3cd731d42551327328ada74d2aaf50) Add width calculation and display 10 models - [`cef0f85`](https://github.com/anomalyco/opencode/commit/cef0f85984e2e6fd4cbb1652da55ccc57f119212) Add model list element background handling - [`7660239`](https://github.com/anomalyco/opencode/commit/76602395ddac17a5200af906a2ec61a769f55ee1) fix(tui): auto-select second model in dialog list on setup - [`49ed871`](https://github.com/anomalyco/opencode/commit/49ed8716226e05f5054c340fb94fcd00ec17aa71) Remove comments - [`8012c2b`](https://github.com/anomalyco/opencode/commit/8012c2bfcd1fa13daa3c856fa8638e9cd99195d7) fix(tui): simplify release date parsing in dialog models - [`19a5697`](https://github.com/anomalyco/opencode/commit/19a5697bcda97297c1379075eb9e6f3942d7ab7f) fix(tui): auto-select first model in dialog list when available - [`8a40331`](https://github.com/anomalyco/opencode/commit/8a40331c5bf8a035eaa0d535a2c315bbfa5ab3ed) fix(tui): remove unnecessary comments in UpdateModelUsage function ### 📊 Changes **3 files changed** (+212 additions, -127 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/dialog/models.go` (+170 -123) 📝 `packages/tui/internal/config/config.go` (+41 -4) 📝 `packages/tui/internal/tui/tui.go` (+1 -0) </details> ### 📄 Description This PR reworks the models dialog as suggested in #541: - No pages anymore, just a single list. - Models are sorted by recent usage, so the most used models are at the top. - Unused models should be sorted by release date. - Increased the displayed models to 10. - Dialog width is dynamically calculated by the longest model/provider name to prevent wrapping. - Model name is in normal text color, provider in muted text color. ![Bildschirmfoto 2025-06-30 um 21 21 12](https://github.com/user-attachments/assets/1404087c-bef6-4efa-ac20-f2f12f1062d8) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:55 -05:00
yindo closed this issue 2026-02-16 18:13:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9647