Documentation
¶
Index ¶
- Constants
- Variables
- func HasAgentsConfig() bool
- func ModelName(id string) string
- func SaveAgents(defs []AgentDef) error
- func SessionIDFromContext(ctx context.Context) string
- func SessionsDir(workingDir string) string
- func WithSessionID(ctx context.Context, sid string) context.Context
- type Agent
- type AgentDef
- type Mode
- type Model
- type SessionInfo
- type SessionLoadStreamer
- type UI
- type Workspace
- func (w *Workspace) Checkpoints() ([]rewind.Checkpoint, error)
- func (w *Workspace) Close()
- func (w *Workspace) Commit(msg string) error
- func (w *Workspace) Diagnostics(ctx context.Context) map[string][]lsp.Diagnostic
- func (w *Workspace) Diffs() ([]rewind.FileDiff, error)
- func (w *Workspace) InitMCP(ctx context.Context) error
- func (w *Workspace) IsGitRepo() bool
- func (w *Workspace) ManagedTools() (mcpTools, lspTools []tool.Tool)
- func (w *Workspace) MemoryContent() string
- func (w *Workspace) Restore(hash string) error
- func (w *Workspace) SyncProjectMode()
- func (w *Workspace) WarmUp()
Constants ¶
View Source
const BuiltinAgentName = "wingman"
Variables ¶
View Source
var AvailableModels = []Model{
{ID: "claude-sonnet-4-6", Name: "Claude Sonnet 4.6"},
{ID: "claude-sonnet-4-5", Name: "Claude Sonnet 4.5"},
{ID: "gpt-5.5", Name: "GPT 5.5"},
{ID: "gpt-5.4", Name: "GPT 5.4"},
{ID: "gpt-5.3-codex", Name: "GPT 5.3 Codex"},
{ID: "gpt-5.2-codex", Name: "GPT 5.2 Codex"},
{ID: "claude-opus-4-8", Name: "Claude Opus 4.8"},
{ID: "claude-opus-4-7", Name: "Claude Opus 4.7"},
{ID: "claude-opus-4-6", Name: "Claude Opus 4.6"},
{ID: "claude-opus-4-5", Name: "Claude Opus 4.5"},
}
Functions ¶
func HasAgentsConfig ¶ added in v0.8.3
func HasAgentsConfig() bool
func SaveAgents ¶ added in v0.7.0
func SessionIDFromContext ¶ added in v0.7.0
func SessionsDir ¶ added in v0.6.9
Types ¶
type Agent ¶
type Agent interface {
Name() string
Workspace() *Workspace
Models(sessionID string) (available []Model, current string)
SetModel(ctx context.Context, sessionID, id string) error
Effort(sessionID string) (current string, options []string)
SetEffort(ctx context.Context, sessionID, value string) error
Modes(sessionID string) (available []Mode, current string)
SetMode(ctx context.Context, sessionID, modeID string) error
ListSessions(ctx context.Context) ([]SessionInfo, error)
NewSession(ctx context.Context) (string, error)
LoadSession(ctx context.Context, id string) error
DeleteSession(ctx context.Context, id string) error
Messages(sessionID string) []agent.Message
Usage(sessionID string) agent.Usage
Send(ctx context.Context, sessionID string, input []agent.Content) iter.Seq2[agent.Message, error]
Cancel(sessionID string)
Close() error
}
type AgentDef ¶ added in v0.7.0
type AgentDef struct {
Name string `json:"name"`
Command string `json:"command"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
func LoadAgents ¶ added in v0.7.0
func LoadAgents() []AgentDef
type SessionInfo ¶ added in v0.7.0
type SessionLoadStreamer ¶ added in v0.8.8
type Workspace ¶ added in v0.6.9
type Workspace struct {
Root *os.Root
RootPath string
MemoryPath string
ScratchPath string
Skills []skill.Skill
MCP *mcp.Manager
LSP *lsp.Manager
Rewind *rewind.Manager
// contains filtered or unexported fields
}
func NewWorkspace ¶ added in v0.6.9
func (*Workspace) Checkpoints ¶ added in v0.6.9
func (w *Workspace) Checkpoints() ([]rewind.Checkpoint, error)
func (*Workspace) Diagnostics ¶ added in v0.6.9
func (*Workspace) ManagedTools ¶ added in v0.7.0
func (*Workspace) MemoryContent ¶ added in v0.6.9
func (*Workspace) SyncProjectMode ¶ added in v0.6.9
func (w *Workspace) SyncProjectMode()
Click to show internal directories.
Click to hide internal directories.