askconfig

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearStored

func ClearStored() error

func ConfigPath

func ConfigPath() (string, error)

func MaskAPIKey

func MaskAPIKey(value string) string

func NeedsAPIKey

func NeedsAPIKey(provider string) bool

func NormalizeMCPProviderName added in v0.2.1

func NormalizeMCPProviderName(name string) string

func ResolveRuntimeSession added in v0.2.0

func ResolveRuntimeSession(provider string) (askauth.Session, string, string, error)

func ResolveRuntimeSessionWithContext added in v0.2.2

func ResolveRuntimeSessionWithContext(ctx context.Context, provider string) (askauth.Session, string, string, error)

func SaveStored

func SaveStored(settings Settings) error

Types

type EffectiveSettings

type EffectiveSettings struct {
	Settings
	APIKeySource     string
	OAuthTokenSource string
	EndpointSource   string
	ProviderSource   string
	ModelSource      string
	AuthStatus       string
	AccountID        string
	LogLevel         string
}

func ResolveEffective

func ResolveEffective(cli Settings) (EffectiveSettings, error)

type MCP

type MCP struct {
	Enabled bool        `json:"enabled,omitempty"`
	Servers []MCPServer `json:"servers,omitempty"`
}

type MCPServer

type MCPServer struct {
	Name       string   `json:"name,omitempty"`
	RunCommand string   `json:"command,omitempty"`
	Args       []string `json:"args,omitempty"`
}

type Settings

type Settings struct {
	Provider   string `json:"provider,omitempty"`
	Model      string `json:"model,omitempty"`
	APIKey     string `json:"apiKey,omitempty"`
	OAuthToken string `json:"oauthToken,omitempty"`
	Endpoint   string `json:"endpoint,omitempty"`
	MCP        MCP    `json:"mcp,omitempty"`
}

func LoadStored

func LoadStored() (Settings, error)

Jump to

Keyboard shortcuts

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