cmd

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "dev"

Version is set dynamically via ldflags during build.

Functions

func AutoInstall

func AutoInstall() error

AutoInstall attempts to install Claude CLI globally via official script. It uses curl/bash on macOS/Linux and powershell on Windows.

func Execute

func Execute()

func IsInstalled

func IsInstalled() bool

IsInstalled returns true if the 'claude' CLI executable is found in system PATH.

func RootCmd

func RootCmd() *cobra.Command

func RunInstallerScript

func RunInstallerScript() error

func RunProviderSet added in v1.2.7

func RunProviderSet(args []string) error

func SetCMD

func SetCMD() *cobra.Command

Types

type AdvancedConfigModel added in v1.2.0

type AdvancedConfigModel struct {

	// Save state
	IsActiveChosen bool
	// contains filtered or unexported fields
}

func NewAdvancedConfigModel added in v1.2.0

func NewAdvancedConfigModel(p *provider.Provider) *AdvancedConfigModel

func NewAdvancedMappingModel added in v1.5.0

func NewAdvancedMappingModel(p *provider.Provider, modelPool []string, metadata map[string]protocol.ModelInfo) *AdvancedConfigModel

NewAdvancedMappingModel opens the slot mapper with a pre-populated catalog. Model IDs remain the selectable and persisted values; metadata supplies only display labels and context hints.

func (*AdvancedConfigModel) Init added in v1.2.0

func (m *AdvancedConfigModel) Init() tea.Cmd

func (*AdvancedConfigModel) Update added in v1.2.0

func (m *AdvancedConfigModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*AdvancedConfigModel) View added in v1.2.0

func (m *AdvancedConfigModel) View() tea.View

type AutoRecommendation added in v1.5.0

type AutoRecommendation struct {
	Opus     string
	Sonnet   string
	Haiku    string
	Custom   string
	Subagent string
	// OneMSlots marks the slots that should carry the [1m] context marker.
	// Only allowlist-confirmed models are auto-enabled; advisory window reports
	// are surfaced to the user but never auto-opened.
	OneMSlots map[string]bool
	// contains filtered or unexported fields
}

AutoRecommendation is the deterministic result of model slot auto-fill. It is a pure value: applying it to a Provider (and writing [1m] markers) happens in the caller, so the recommendation can be unit-tested without a Bubble Tea model and re-rendered without mutating the draft.

func RecommendModels added in v1.5.0

func RecommendModels(current provider.Provider, models []string, metadata map[string]protocol.ModelInfo) AutoRecommendation

RecommendModels picks slot models for a provider after a successful protocol and model-list detection. It never mutates current.

Precedence:

  1. Preserve a slot whose current model is still in models (updating an existing provider must not overwrite a working mapping).
  2. Otherwise recommend by model-name semantics.
  3. Tie-break by catalog metadata (context window, rate multiplier).

Metadata is optional; when a model has no ModelInfo entry the name heuristics alone decide. models is the exact pool from the upstream /models catalog, and the returned IDs always come from it (or are empty).

Jump to

Keyboard shortcuts

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