Documentation
¶
Index ¶
- Constants
- func Dir() (string, error)
- func Exists() bool
- func ExpandTemplate(v string) (string, error)
- func IsWholeRef(v string) bool
- func LoadCatalogs() map[string]Catalog
- func LogEvent(op, detail string)
- func MarkSetupDone()
- func MeInstructions() string
- func MePath() string
- func ProjectGoalMaxRounds(dir string) int
- func ReadJSON(name string, v any) error
- func ResolveEnvMap(env map[string]string) (map[string]string, error)
- func ResolveHeader(v string) (string, error)
- func ResolveSecret(v string) (string, error)
- func SaveCatalogs(cats map[string]Catalog) error
- func SetProjectGoalMaxRounds(dir string, n int) error
- func SetupDone() bool
- func Trust(dir string) error
- func Trusted(dir string) bool
- func WriteJSON(name string, v any) error
- type BrowserConfig
- type Catalog
- func (c Catalog) ContextLength(id string) int
- func (c Catalog) Efforts(id string) []string
- func (c Catalog) Find(id string) *ModelInfoLite
- func (c Catalog) MaxCompletionTokens(id string) int
- func (c Catalog) Pricing(id string) (in, out, cacheRead float64, ok bool)
- func (c Catalog) Stale() bool
- func (c Catalog) SupportsVision(id string) (vision, found bool)
- type ComputerConfig
- type Config
- type LSPServer
- type MCPImport
- type MCPImportSource
- type MCPServer
- type Model
- type ModelInfoLite
- type PiModel
- type Provider
- type SamplingParams
- type UnknownModelError
Constants ¶
View Source
const DefaultCompactModel = "model1"
View Source
const DefaultCompactPct = 50
View Source
const DefaultGoalMaxRounds = 100
View Source
const DefaultTaskModel = DefaultCompactModel
View Source
const MeSeed = `` /* 401-byte string literal not displayed */
View Source
const SecretCmdTimeout = 5 * time.Second
Variables ¶
This section is empty.
Functions ¶
func ExpandTemplate ¶
func IsWholeRef ¶
func LoadCatalogs ¶
func MarkSetupDone ¶
func MarkSetupDone()
func MeInstructions ¶
func MeInstructions() string
func ProjectGoalMaxRounds ¶
func ResolveHeader ¶
func ResolveSecret ¶
func SaveCatalogs ¶
func SetProjectGoalMaxRounds ¶
Types ¶
type BrowserConfig ¶
type Catalog ¶
type Catalog struct {
FetchedAt time.Time `json:"fetchedAt"`
BaseURL string `json:"baseUrl"`
Models []ModelInfoLite `json:"models"`
}
func (Catalog) ContextLength ¶
func (Catalog) Find ¶
func (c Catalog) Find(id string) *ModelInfoLite
func (Catalog) MaxCompletionTokens ¶
func (Catalog) SupportsVision ¶
type ComputerConfig ¶
type Config ¶
type Config struct {
Language string `json:"language,omitempty"`
DefaultModel string `json:"defaultModel"`
DefaultProvider string `json:"defaultProvider,omitempty"`
DefaultEffort string `json:"defaultEffort,omitempty"`
CompactModel string `json:"compactModel,omitempty"`
CompactProvider string `json:"compactProvider,omitempty"`
CompactPct int `json:"compactPct,omitempty"`
TaskModel string `json:"taskModel,omitempty"`
TaskProvider string `json:"taskProvider,omitempty"`
Theme string `json:"theme,omitempty"`
Mouse *bool `json:"mouse,omitempty"`
Thinking *bool `json:"thinking,omitempty"`
CollapsePaste *bool `json:"collapsePaste,omitempty"`
GoalMaxRounds int `json:"goalMaxRounds,omitempty"`
WorktreeSubagents *bool `json:"worktreeSubagents,omitempty"`
MaxRetries int `json:"maxRetries,omitempty"`
Experimental []string `json:"experimental,omitempty"`
Providers map[string]Provider `json:"providers"`
Models map[string]Model `json:"-"`
MCPServers map[string]MCPServer `json:"mcp,omitempty"`
MCPImport *MCPImport `json:"mcpImport,omitempty"`
LSPServers map[string]LSPServer `json:"lsp,omitempty"`
Browser BrowserConfig `json:"browser,omitzero"`
Computer ComputerConfig `json:"computer,omitzero"`
// contains filtered or unexported fields
}
func (*Config) RemoveProvider ¶
type MCPImport ¶
type MCPImport struct {
Claude *MCPImportSource `json:"claude,omitempty"`
Codex *MCPImportSource `json:"codex,omitempty"`
}
type MCPImportSource ¶
type MCPServer ¶
type MCPServer struct {
Command []string `json:"command,omitempty"`
Env map[string]string `json:"env,omitempty"`
Cwd string `json:"cwd,omitempty"`
URL string `json:"url,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Note string `json:"note,omitempty"`
StartupTimeout int `json:"startupTimeout,omitempty"`
ToolTimeout int `json:"toolTimeout,omitempty"`
}
type Model ¶
type Model struct {
Name string `json:"name,omitempty"`
Providers []string `json:"providers"`
ID string `json:"id,omitempty"`
Context int `json:"context,omitempty"`
MaxOut int `json:"maxOut,omitempty"`
Vision bool `json:"vision,omitempty"`
SamplingParams *SamplingParams `json:"samplingParams,omitempty"`
}
func (Model) ContextWindow ¶
type ModelInfoLite ¶
type ModelInfoLite struct {
ID string `json:"id"`
ContextLength int `json:"contextLength,omitempty"`
MaxCompletionTokens int `json:"maxCompletionTokens,omitempty"`
ReasoningEfforts []string `json:"reasoningEfforts,omitempty"`
InPrice float64 `json:"inPrice,omitempty"`
OutPrice float64 `json:"outPrice,omitempty"`
CacheReadPrice float64 `json:"cacheReadPrice,omitempty"`
InputModalities []string `json:"inputModalities,omitempty"`
}
type PiModel ¶
type PiModel struct {
ID string `json:"id"`
Name string `json:"name,omitempty"`
API string `json:"api,omitempty"`
Reasoning bool `json:"reasoning,omitempty"`
Input []string `json:"input,omitempty"`
ContextWindow int `json:"contextWindow,omitempty"`
MaxTokens int `json:"maxTokens,omitempty"`
SamplingParams *SamplingParams `json:"samplingParams,omitempty"`
}
type Provider ¶
type Provider struct {
Name string `json:"name,omitempty"`
BaseURL string `json:"baseUrl"`
API string `json:"api"`
APIKey string `json:"apiKey"`
PromptCachingEnabled *bool `json:"promptCachingEnabled,omitempty"`
PromptCacheRetention string `json:"promptCacheRetention,omitempty"`
CacheSessionAffinity *bool `json:"cacheSessionAffinity,omitempty"`
CacheControlFormat string `json:"cacheControlFormat,omitempty"`
Models []PiModel `json:"models"`
}
func (Provider) ResolveKey ¶
type SamplingParams ¶
type UnknownModelError ¶
type UnknownModelError struct {
Model string
// contains filtered or unexported fields
}
func (*UnknownModelError) Error ¶
func (e *UnknownModelError) Error() string
Click to show internal directories.
Click to hide internal directories.