agent: rename reasoning → Agent
The inner struct that holds agent-specific state (history, runtime, backend, tools, hooks) is now called Agent — because that's what it is. A session owns an Agent; the Agent performs reasoning within the session's environment.
This commit is contained in:
parent
e10319758b
commit
1aebc49d4e
|
|
@ -311,7 +311,7 @@ type AgentCoreConfig struct {
|
|||
// but has no knowledge of how output is rendered.
|
||||
type agent struct {
|
||||
sess *session.Session
|
||||
r *reasoning
|
||||
r *Agent
|
||||
log *olog.Logger
|
||||
sessionsDir string
|
||||
readPlanStep func() string
|
||||
|
|
@ -459,7 +459,7 @@ func NewAgentCore(cfg AgentCoreConfig) Core {
|
|||
Uname: cfg.Uname,
|
||||
CWD: paths.ExpandHome(cfg.CWD),
|
||||
}),
|
||||
r: &reasoning{
|
||||
r: &Agent{
|
||||
history: cfg.History,
|
||||
runtime: rt,
|
||||
agentName: cfg.AgentName,
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ import (
|
|||
"ollie/tools"
|
||||
)
|
||||
|
||||
// reasoning holds the state of the current reasoning entity (the "agent"
|
||||
// Agent holds the state of the current Agent entity (the "agent"
|
||||
// in the traditional sense). It is swappable: when the user runs /agent,
|
||||
// a new reasoning is built from the new agent config while the session
|
||||
// a new Agent is built from the new agent config while the session
|
||||
// host remains stable.
|
||||
type reasoning struct {
|
||||
type Agent struct {
|
||||
history *History
|
||||
runtime *Runtime
|
||||
cfg agentConfig // per-turn config built from runtime
|
||||
|
|
@ -28,7 +28,7 @@ type reasoning struct {
|
|||
}
|
||||
|
||||
// Backend returns the active backend from the runtime.
|
||||
func (r *reasoning) Backend() backend.Backend {
|
||||
func (r *Agent) Backend() backend.Backend {
|
||||
if r.runtime == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue