fix(agent): code format fixed
This commit is contained in:
parent
b1d947e337
commit
11f9d962ea
7 changed files with 10 additions and 13 deletions
|
|
@ -37,4 +37,4 @@ func NewPipeline(al *AgentLoop) *Pipeline {
|
|||
Steering: al.steering,
|
||||
al: al,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -629,9 +629,9 @@ toolLoop:
|
|||
if len(exec.pendingMessages) > 0 {
|
||||
logger.InfoCF("agent", "Pending steering after partial tool execution; continuing turn",
|
||||
map[string]any{
|
||||
"agent_id": ts.agent.ID,
|
||||
"pending_count": len(exec.pendingMessages),
|
||||
"allResponsesHandled": exec.allResponsesHandled,
|
||||
"agent_id": ts.agent.ID,
|
||||
"pending_count": len(exec.pendingMessages),
|
||||
"allResponsesHandled": exec.allResponsesHandled,
|
||||
})
|
||||
return ToolControlContinue
|
||||
}
|
||||
|
|
@ -691,4 +691,4 @@ toolLoop:
|
|||
"agent_id": ts.agent.ID, "iteration": iteration,
|
||||
})
|
||||
return ToolControlContinue
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ func (p *Pipeline) Finalize(
|
|||
// But still check for hard abort - if requested, abort the turn.
|
||||
if exec.allResponsesHandled {
|
||||
if ts.hardAbortRequested() {
|
||||
turnStatus = TurnEndStatusAborted
|
||||
return al.abortTurn(ts)
|
||||
}
|
||||
ts.setPhase(TurnPhaseCompleted)
|
||||
|
|
@ -46,7 +45,6 @@ func (p *Pipeline) Finalize(
|
|||
ts.recordPersistedMessage(finalMsg)
|
||||
ts.ingestMessage(turnCtx, al, finalMsg)
|
||||
if err := ts.agent.Sessions.Save(ts.sessionKey); err != nil {
|
||||
turnStatus = TurnEndStatusError
|
||||
al.emitEvent(
|
||||
EventKindError,
|
||||
ts.eventMeta("runTurn", "turn.error"),
|
||||
|
|
@ -55,7 +53,7 @@ func (p *Pipeline) Finalize(
|
|||
Message: err.Error(),
|
||||
},
|
||||
)
|
||||
return turnResult{}, err
|
||||
return turnResult{status: TurnEndStatusError}, err
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,4 +74,4 @@ func (p *Pipeline) Finalize(
|
|||
status: turnStatus,
|
||||
followUps: append([]bus.InboundMessage(nil), ts.followUps...),
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -517,4 +517,4 @@ func (p *Pipeline) CallLLM(
|
|||
}
|
||||
|
||||
return ControlToolLoop, nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,4 +113,4 @@ func (p *Pipeline) SetupTurn(ctx context.Context, ts *turnState) (*turnExecution
|
|||
exec.usedLight = usedLight
|
||||
|
||||
return exec, nil
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,6 @@ func (al *AgentLoop) runTurn(ctx context.Context, ts *turnState, pipeline *Pipel
|
|||
return pipeline.Finalize(ctx, turnCtx, ts, exec, turnStatus, finalContent)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ts.hardAbortRequested() {
|
||||
|
|
|
|||
|
|
@ -642,4 +642,4 @@ func turnStateFromContext(ctx context.Context) *turnState {
|
|||
// TurnStateFromContext retrieves turnState from context (exported for tools)
|
||||
func TurnStateFromContext(ctx context.Context) *turnState {
|
||||
return turnStateFromContext(ctx)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue