Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ClaudeCodeRequestModels = []string{
"tingly/cc",
"tingly/cc-haiku",
"tingly/cc-sonnet",
"tingly/cc-opus",
"tingly/cc-default",
"tingly/cc-subagent",
}
ClaudeCodeRequestModels defines all request models for Claude Code scenario When applying claude-code agent, all these rules should be updated for convenience
var OpenCodeRequestModels = []string{
"tingly-opencode",
}
OpenCodeRequestModels defines all request models for OpenCode scenario
Functions ¶
func GenerateClaudeCodeEnv ¶ added in v0.260409.1540
GenerateClaudeCodeEnv generates environment variables for Claude Code settings. unified=true means all model slots point to "tingly/cc"; false uses separate cc-* models.
func GenerateOpenCodePayload ¶ added in v0.260409.1540
func GenerateOpenCodePayload(configBaseURL, apiKey string, models map[string]interface{}) map[string]interface{}
GenerateOpenCodePayload generates the OpenCode configuration payload. models is a map of model-name → model config object (map[string]interface{}). Pass nil or empty map to use the default single-model layout.
Types ¶
type AgentApply ¶
type AgentApply struct {
// contains filtered or unexported fields
}
AgentApply handles agent configuration application This is shared logic used by both CLI and HTTP handlers
func NewAgentApply ¶
func NewAgentApply(cfg *serverconfig.Config, host string) *AgentApply
NewAgentApply creates a new AgentApply instance
func (*AgentApply) ApplyAgent ¶
func (aa *AgentApply) ApplyAgent(req *ApplyAgentRequest) (*ApplyAgentResult, error)
ApplyAgent applies configuration for the specified agent type
type AgentInfo ¶
type AgentInfo struct {
// Type is the agent type
Type AgentType
// Name is the display name
Name string
// Description is a brief description
Description string
// ConfigFiles lists the configuration files this agent uses
ConfigFiles []string
// Scenario is the corresponding routing rule scenario
Scenario string
}
AgentInfo provides information about an agent type
func GetAgentInfo ¶
GetAgentInfo returns information about a specific agent type
func ListAgentInfo ¶
func ListAgentInfo() []AgentInfo
ListAgentInfo returns information about all supported agent types
type AgentType ¶
type AgentType string
AgentType represents the type of AI agent to configure
type ApplyAgentRequest ¶
type ApplyAgentRequest struct {
// AgentType is the type of agent to configure (required)
AgentType AgentType
// Provider is the provider UUID to use (optional, prompts if empty)
Provider string
// Model is the model name to use (optional, prompts if empty)
Model string
// Unified specifies unified mode for claude-code (single config for all models)
// Only applicable for AgentTypeClaudeCode
Unified bool
// Force skips confirmation prompts
Force bool
// Preview shows what would be applied without actually applying
Preview bool
// InstallStatusLine installs the status line script for Claude Code
// Only applicable for AgentTypeClaudeCode
InstallStatusLine bool
}
ApplyAgentRequest represents a request to apply agent configuration
type ApplyAgentResult ¶
type ApplyAgentResult struct {
// Success indicates whether the operation completed successfully
Success bool
// AgentType is the type of agent that was configured
AgentType AgentType
// ProviderName is the name of the provider that was selected
ProviderName string
// ProviderUUID is the UUID of the provider that was selected
ProviderUUID string
// Model is the model name that was selected
Model string
// ConfigFiles lists the files that were created or updated
ConfigFiles []string
// BackupPaths lists the paths to backup files created
BackupPaths []string
// RulesCreated indicates how many new routing rules were created
RulesCreated int
// RulesUpdated indicates how many existing routing rules were updated
RulesUpdated int
// Message contains a human-readable result message
Message string
}
ApplyAgentResult represents the result of applying agent configuration