Skip to content

feat: /models command — show authenticated models with last-used sorting, preserve screen on Esc #89

Description

@randomm

Requirements

1. Show only authenticated models

Currently /models opens the complete list of all models. It should instead show only models the backend is currently authenticated against (i.e., models the user has valid API keys for).

2. Last-used models at top

Display recently/last-used models in a separate segment at the top of the list, similar to the opencode TUI behavior.

3. Preserve screen content on Esc

When the user presses Esc during model selection, the UI should return to exactly how it was before — all previous conversation content intact. Currently, the user returns to an empty screen and all valuable content is lost.

4. General menu/selection pattern

Establish a reusable pattern for menus/selections in oclite that preserves terminal content. This will be reused for other selection UIs.

Research Needed

  • How opencode full TUI handles model selection (authenticated filtering, last-used sorting)
  • Best practices for non-destructive TUI menus (inline selection, overlay patterns, alternate screen considerations)
  • Current /models implementation in oclite

Acceptance Criteria

  • /models only shows models the user is authenticated for
  • Last-used models appear in a separate top section
  • Pressing Esc returns to the previous screen state with all content preserved
  • Pattern is reusable for future selection menus
  • Tests for model filtering and selection logic

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions