tuimodel

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL