Documentation
¶
Overview ¶
Package tuimodel reads the opencode TUI's persisted model selection from $XDG_STATE_HOME/opencode/model.json so the SDK can default new sessions to whatever model the user last picked interactively.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve() string
Resolve returns the model id the opencode TUI would open with, in the `providerID/modelID[/variant]` form opencode accepts via session/set_config_option. Returns "" when the file is absent, unreadable, malformed, or carries no recent entry.
The path resolution honors XDG_STATE_HOME and falls back to ~/.local/state/opencode/model.json, matching opencode's own layout.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.