Skip to content

:models is a pit you choose in, and Enter sets the model - #33

Closed
jack-work wants to merge 1 commit into
mainfrom
feat/models-pit
Closed

jack-work wants to merge 1 commit into
mainfrom
feat/models-pit

Conversation

@jack-work

Copy link
Copy Markdown
Owner

:models in the transcript's command box is now a selection pit, the same picker as the completion, form and queue pits, and Enter sets the aria's model.

  • Navigation: ^N/^P and j/k move; the wash and marker show the choice; y yanks the model id; / searches; gg/G reach the ends of the list (300+ models across providers here).
  • Current model: marked with ●, and every row shows its provider.
  • Enter: writes system.model to the chosen id and system.provider to the provider that listed it, in one patch. A model means nothing to another provider, so picking a copilot model while the board said anthropic would have failed on the next turn. When the provider already matches, the store drops the unchanged key and it's exactly figaro set system.model <id>. The bar confirms and the ● moves. The write happens off the render lock.
  • Search reaches providers: / walks selectable rows and the provider heading isn't one, so the picker now also searches a row's note. That also makes the tab pit's descriptions searchable.
  • figaro models from a shell: shares the fetch and writes to the package's stdout. It used os.Stdout, which inside the pager painted over the screen.

Verified

Flake build, isolated .#sandbox devshell, real credentials:

  • :models listed every configured provider's models.
  • Enter on claude-opus-5-5: figaro state showed it, and the next turn was answered by it.
  • Enter on a copilot model: model and provider changed together, and the next turn was answered through copilot.
  • Enter back on anthropic restored both.

Tests: TestModelsView* (4), red first. Full suite green, apart from one flake in internal/figaro (TestAgent_FIFOOrdering), which this PR doesn't touch; it passes -count=3 on both this branch and main.

`:models` in the command box printed the table `figaro models` prints, with
os.Stdout: round the pager's writer, onto the terminal. Nothing on it could be
acted on. It is now an itemised live view (itemView, like the form and the
queue), so the pit's one picker drives it: ^N/^P and j/k move, the wash and
the marker show the choice, `y` yanks the model id, `/` searches, G and gg
reach the ends of three hundred models. The subject's current model carries a
●, and each row carries its provider.

ENTER SETS THE MODEL, and its provider with it, in one patch: system.model to
the chosen id and system.provider to the provider that listed it. A model is
only meaningful to its own provider, and choosing copilot's model while the
board still said anthropic would send a name Anthropic has never heard of on
the next turn. When the provider already matches, the store drops the
unchanged key and the write is exactly `figaro set system.model <id>`. The
bar says what took; the ● moves. Activate hands off to a goroutine: it runs
under the render lock and the set dials.

`/` could not reach a provider: the heading is chrome and search walks
selectable rows. The picker now searches a row's note as well as its text --
what a reader sees is what `/` finds -- which also makes the tab pit's
descriptions searchable.

The standalone `figaro models` shares the fetch and now writes to the
package's stdout, so it can never paint over a pager again.

Verified with the flake build in an isolated .#sandbox shell, real
credentials: :models lists every configured provider's models, Enter on
claude-opus-5-5 set it (figaro state agrees) and the next turn was answered by
it; Enter on a copilot model set model and provider together and the next
turn was answered through copilot; Enter back on anthropic restored both.
@jack-work

Copy link
Copy Markdown
Owner Author

Superseded by #35, which merges this with its sibling into one branch to validate. Nothing is lost: this branch's commit is in #35's history.

@jack-work jack-work closed this Sep 30, 2026
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