[PR #289] [CLOSED] feat: add sorting by release/update date in models dialog #9575

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

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/289
Author: @aryasaatvik
Created: 6/21/2025
Status: Closed

Base: devHead: feat/sort-models-by-date


📝 Commits (7)

  • bd04594 feat(provider): add lightweight model configuration and retrieval logic
  • bc23ba2 tui: generate api client
  • 20bc9dc feat(provider): enhance model selection with lightweight model support and UI updates
  • 4e500a3 fix(tui): update inactive selection styling to use accent color
  • f8f7ba6 refactor(tui): improve model initialization and rendering logic for better provider handling
  • b4d2a11 feat(provider): add release_date and last_updated fields to models for enhanced tracking
  • 02f7187 feat(dialog): implement sorting functionality for model selection with sort mode cycling

📊 Changes

13 files changed (+889 additions, -170 deletions)

View changed files

📝 packages/opencode/src/config/config.ts (+5 -1)
📝 packages/opencode/src/provider/models.ts (+12 -0)
📝 packages/opencode/src/provider/provider.ts (+35 -0)
📝 packages/opencode/src/provider/transform.ts (+1 -1)
📝 packages/tui/internal/app/app.go (+83 -27)
📝 packages/tui/internal/components/chat/editor.go (+11 -2)
📝 packages/tui/internal/components/dialog/models.go (+464 -116)
📝 packages/tui/internal/components/status/status.go (+1 -1)
📝 packages/tui/internal/config/config.go (+5 -3)
📝 packages/tui/internal/tui/tui.go (+10 -4)
📝 packages/tui/internal/util/util.go (+13 -0)
📝 packages/tui/pkg/client/gen/openapi.json (+81 -5)
📝 packages/tui/pkg/client/generated-client.go (+168 -10)

📄 Description

Summary

Adds support for sorting models by last_updated/release_date in the TUI models dialog. This change depends on models.dev PR sst/models.dev#20 which adds the date fields to the model schema.

Note: This PR is branched from #279 (feat/lightweight-model-configuration)

resolves #253

Changes

  • Added and fields to ModelsDev schema
  • Added sorting modes: by name (default), by last updated, by release date
  • Press 'S' key to cycle through sort modes in models dialog
  • Shows current sort mode in dialog title
  • Stable multi-level sorting with proper tiebreakers

Testing

Currently using local override at for testing until models.dev is updated with the new fields.

https://github.com/user-attachments/assets/56beb55b-f8c6-4557-b785-c0582bfa9f55


🔄 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/289 **Author:** [@aryasaatvik](https://github.com/aryasaatvik) **Created:** 6/21/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feat/sort-models-by-date` --- ### 📝 Commits (7) - [`bd04594`](https://github.com/anomalyco/opencode/commit/bd04594ef826325713c265fa05c2cd448249f1ab) feat(provider): add lightweight model configuration and retrieval logic - [`bc23ba2`](https://github.com/anomalyco/opencode/commit/bc23ba28d3dd9a1c2c2120c6b1154d386113ce59) tui: generate api client - [`20bc9dc`](https://github.com/anomalyco/opencode/commit/20bc9dcba008c36bc80ec5b85396fb24b795c8b9) feat(provider): enhance model selection with lightweight model support and UI updates - [`4e500a3`](https://github.com/anomalyco/opencode/commit/4e500a3ca4eb07a616b297ad2f793281b1c61365) fix(tui): update inactive selection styling to use accent color - [`f8f7ba6`](https://github.com/anomalyco/opencode/commit/f8f7ba636904109fa55fc33b1a9e000e2d2f0409) refactor(tui): improve model initialization and rendering logic for better provider handling - [`b4d2a11`](https://github.com/anomalyco/opencode/commit/b4d2a11993c38bb9ab364a3c83fc4ebbdf960940) feat(provider): add release_date and last_updated fields to models for enhanced tracking - [`02f7187`](https://github.com/anomalyco/opencode/commit/02f718754f8328f71230e180a0846d60c7319049) feat(dialog): implement sorting functionality for model selection with sort mode cycling ### 📊 Changes **13 files changed** (+889 additions, -170 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/config/config.ts` (+5 -1) 📝 `packages/opencode/src/provider/models.ts` (+12 -0) 📝 `packages/opencode/src/provider/provider.ts` (+35 -0) 📝 `packages/opencode/src/provider/transform.ts` (+1 -1) 📝 `packages/tui/internal/app/app.go` (+83 -27) 📝 `packages/tui/internal/components/chat/editor.go` (+11 -2) 📝 `packages/tui/internal/components/dialog/models.go` (+464 -116) 📝 `packages/tui/internal/components/status/status.go` (+1 -1) 📝 `packages/tui/internal/config/config.go` (+5 -3) 📝 `packages/tui/internal/tui/tui.go` (+10 -4) 📝 `packages/tui/internal/util/util.go` (+13 -0) 📝 `packages/tui/pkg/client/gen/openapi.json` (+81 -5) 📝 `packages/tui/pkg/client/generated-client.go` (+168 -10) </details> ### 📄 Description ## Summary Adds support for sorting models by last_updated/release_date in the TUI models dialog. This change depends on models.dev PR sst/models.dev#20 which adds the date fields to the model schema. **Note**: This PR is branched from #279 (feat/lightweight-model-configuration) resolves #253 ## Changes - Added and fields to ModelsDev schema - Added sorting modes: by name (default), by last updated, by release date - Press 'S' key to cycle through sort modes in models dialog - Shows current sort mode in dialog title - Stable multi-level sorting with proper tiebreakers ## Testing Currently using local override at for testing until models.dev is updated with the new fields. https://github.com/user-attachments/assets/56beb55b-f8c6-4557-b785-c0582bfa9f55 --- <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:47 -05:00
yindo closed this issue 2026-02-16 18:13:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9575