remove stray .bak file
This commit is contained in:
parent
8f883c2355
commit
f265fd3a9f
|
|
@ -1,60 +0,0 @@
|
|||
package agent
|
||||
|
||||
import (
|
||||
"sync"
|
||||
|
||||
"ollie/backend"
|
||||
olog "ollie/log"
|
||||
"ollie/toolsrv"
|
||||
)
|
||||
|
||||
// AgentCfg is the configuration for constructing a new Agent.
|
||||
type AgentCfg struct {
|
||||
History *History
|
||||
Runtime *Runtime
|
||||
AgentName string
|
||||
AgentsDir string
|
||||
AgentID string // unique agent identity
|
||||
CWD string // working directory for tool execution
|
||||
BaseLayers []string
|
||||
PromptEnvExtra []string
|
||||
NewToolServer func() toolsrv.Runner
|
||||
NewBackend func(string) (backend.Backend, error)
|
||||
Output EventHandler
|
||||
Log *olog.Logger
|
||||
AuditLog *olog.Logger
|
||||
SessionID string
|
||||
StartupMsgs []string
|
||||
ReadPlanStep func() string
|
||||
SaveSession func()
|
||||
FlushSave func()
|
||||
}
|
||||
|
||||
// NewAgent constructs an Agent from the given configuration.
|
||||
func NewAgent(cfg AgentCfg) *Agent {
|
||||
ag := &Agent{
|
||||
history: cfg.History,
|
||||
runtime: cfg.Runtime,
|
||||
agentName: cfg.AgentName,
|
||||
agentsDir: cfg.AgentsDir,
|
||||
id: cfg.AgentID,
|
||||
cwd: cfg.CWD,
|
||||
baseLayers: cfg.BaseLayers,
|
||||
promptEnvExtra: cfg.PromptEnvExtra,
|
||||
newToolServer: cfg.NewToolServer,
|
||||
newBackend: cfg.NewBackend,
|
||||
output: cfg.Output,
|
||||
log: cfg.Log,
|
||||
auditLog: cfg.AuditLog,
|
||||
sessionID: cfg.SessionID,
|
||||
startupMessages: cfg.StartupMsgs,
|
||||
readPlanStep: cfg.ReadPlanStep,
|
||||
saveSession: cfg.SaveSession,
|
||||
flushSave: cfg.FlushSave,
|
||||
state: "idle",
|
||||
}
|
||||
ag.changeCond = sync.NewCond(&ag.changeMu)
|
||||
ag.turnError = ag.defaultTurnError
|
||||
ag.wireToolsChanged()
|
||||
return ag
|
||||
}
|
||||
Loading…
Reference in New Issue